[Grace-core] typeof/decltype/getType as alternaties to generic methods?

Marco Servetto marco.servetto at gmail.com
Wed Nov 19 23:31:32 PST 2014


I would like to understand why is "not great" in your opinion.
Of course is not what we are used to,
But it is didactically interesting.

In typed languages certain concepts need a declaration before their usage.
for example, classes.
In Javascript I can just write an object with some stuff in and go
over for a good while, and there is no "centralized place" in the code
to tell me what is going on.
This can be liked or not.

In this kind of proposal, we basically end up repeating that  certain
concepts needs a declaration before their usage.
and we are including certain kinds of sophistical data manipulations
in this set of concepts.

Mapping is not a thing a student can understand without blinking, is
not like size or isEmpty.

May be there is a didactic advantage of having an explicit declaration
point for concepts soo hard that they have to take a higher level
function or a closure to gain a meaning.


On 20 November 2014 14:20, James Noble <kjx at ecs.vuw.ac.nz> wrote:
> On 20/11/2014, at 20:14 pm, Marco Servetto <marco.servetto at gmail.com> wrote:
>
>> ok, if you want map as a method of list,
>> that is an example of a polimorphic method.
>
> right.
>
>> I'm proposing to declare a "new" map type, every time you need to do a mapping,
>
> yep - which is, well, not great. Still we can see what other people thing!
>
> James


More information about the Grace-core mailing list