LoginLogin
Might make SBS readonly: thread

[__] Lowerdash String Member Poll

Root / Talk About Programs / [.]

kldck_hulCreated:
Howdy folks! I'm looking to release the next version of Lowerdash soon. One of the new features is string members in modules, and I'm curious what syntax the community likes best. Currently users can declare an untyped numerical variable with:
MEM member
And access it with:
_(instance,"member")
Option 1: What type is this again? MEM declarations that end with a $ will be added to the symbol table as strings
MEM string$
These members can then be accessed with:
_(instance,"string")
Pro * Single way to access everything module related Con * The type is not obvious when you access the variable. Option 2: Magical special case Introduce MEM$ declarations to add to the symbol table as strings
MEM$ string
These members can then be accessed with:
_$(instance,"string")
Pros * Type is apparent * Can optimize lookup time Cons * Janky syntax just for strings * Function AND Numbers are still accessed from _(). Should there be a _%()? Poll Reply with a number to vote! 1 - What type is this again? 2 - Magical special case 3 - A better suggestion

I vote 2. If the performance of 2 is better, then is clear that 2 is the best option. Beside, with the syntax of 2, I can know that I will get an String on the line where I access to that instance and not look up into the variable declaration.