DEV Community

Discussion on: Julia, surprise me! (some astonishments while learning a new programming language)

Collapse
 
jmccabe profile image
John McCabe

Don't get me started on Python; had the geezer whose ego resulted in Python actually paid proper attention to 'real' programming languages, he wouldn't have decided to use exclusively zero-based indexes in sequences/lists (that's just lazy), nor specification of ranges from 'start index' to 'end index + 1', e.g. a slice a_list[12:15] isn't a 4 element subset of a_list made up of the items in index 12 through 15, it's a 3 element subset including items 12 through (15 - 1). This is related to the zero-based indexing; a_list[:12] gives you 12 elements starting at 0.
The point of a high level language is to allow us to abstract the implementation away from the machine domain into the problem domain; exclusive zero-based indexing at the source code level is nonsense.

I haven't looked closely at Julia; how closely based on C is it? What features does it have that 1) aren't in any other language and 2) couldn't possibly have been added to another language?