I'm still reading the doc, so nothing to say on the language but the website is great!
The Phix Programming Language
41–46 of 46 posts
Re: The Phix Programming Language
#42What I need to know about a language: Does it do static types? Does it depend on GC? Can I pass functions to functions? Can I build an aggregate by listing the members, and pass it around? Can I vary the implementation of a function according to the types passed, as determined at compile time? If your description just lists (howsoever appealing) platitudes, I don't get the answers I need.
It is dynamicly typed with optional validators built-in. The cool part (and also the main weakness) is usage of resizable array-based vectors for all composite data types. Other distinguishing traits are RC-based GC, no higher-order functions (but ability to pass function pointers), direct memory access via BASIC-like poke. Original Euphoria language wasn't a scripting one, more like C on steroids (for MS-DOS), and i…
Doesn’t this describe many of the modern languages - python’s lists, ruby’s arrays, etc...? Or is the cool part the lack of more specialized classes like dict or set?
Re: The Phix Programming Language
#43I don't understand why anyone would create a one-indexed language these days. I feel like Dijkstra laid out pretty well why zero-indexing is objectively better [1]. If that wasn't enough, it's also most common by far. [1] https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/E...
If you're trying to describe an offset from a starting position, then zero-indexing makes sense.
If you're trying to describe the rank/position of something in a list, then IMO one-indexing is not unreasonable.
Re: The Phix Programming Language
#44Earlier quoted context omitted.
It is dynamicly typed with optional validators built-in. The cool part (and also the main weakness) is usage of resizable array-based vectors for all composite data types. Other distinguishing traits are RC-based GC, no higher-order functions (but ability to pass function pointers), direct memory access via BASIC-like poke. Original Euphoria language wasn't a scripting one, more like C on steroids (for MS-DOS), and i…
> usage of resizable array-based vectors for all composite data types Doesn’t this describe many of the modern languages - python’s lists, ruby’s arrays, etc...? Or is the cool part the lack of more specialized classes like dict or set?
Re: The Phix Programming Language
#45Earlier quoted context omitted.
Shouldn't the tuple for 1-based indexing be 1,n,n ?
Yes, you're right. I think that slip says a lot about the tricky issue at hand. First position, last position, and length for an array of [1, 2, 3]. 0-based: 0, 2, 3 (0, n-1, n) 1-based: 1, 3, 3 (1, n, n) Actually, that's a pretty convincing argument. I've played with Lua before, and did get the feeling that 1-based index has some advantages (but couldn't articulate why). Having the last position and the length be th…