DEV Community

Discussion on: Features of a dream programming language

Collapse
 
juancarlospaco profile image
Juan Carlos

It looks a lot like Nim.

Collapse
 
redbar0n profile image
Magne

I did look briefly at Nim and while it looks like a nice language in its own right, it is quite different from the language that I envision. I dream of a more pure functional language (e.g. uses map instead of for-loops etc.), for starters.

Collapse
 
carloslfu profile image
Carlos Galarza

The problem with functional language constructs like map is that they are less intuitive/familiar for beginners. I have found it easier to teach loops than map/filter/reduce. A solution could be that the language suggest this to the developer and offer automatic refactoring of the for-loop, something like: "It might better to use the map function instead -> refactor".

Thread Thread
 
redbar0n profile image
Magne

yeah, map has a problematic name for beginners. It should have been called something like apply. Because you "apply" an operation to some thing. "Mapping" a set of things to another set of things (by way of a function) is too much derived from abstract mathematics to be beginner friendly (as is much of FP lingo, sadly).