Re: named array

new topic     » goto parent     » topic index » view thread      » older message » newer message
TheresNoTime said...

My approach - always make clones, even if they are not needed.

Which works fine with Euphoria maps as well.

TheresNoTime said...
said...

Agreed - a mutable map type (like the one in Euphoria) has a lot more functionality.

In my particular case, this functionality is not only superfluous but also harmful.

Based on the needs that you have described so far, I disagree. It appears to be harmless. In fact, you contradict yourself on this point - Python's Dict type is also mutable (and should therefore suffer from the same disadvantages), yet you do not treat this as harmful.

TheresNoTime said...
said...

If I understand correctly, your preprocessor example would be, though. I agree that, for stylistic reasons, that would be the better approach. Adding a new literal symbol type should be done by adding a new literal symbol type, with syntax sugar and all, not by faking it with arrays and strings or maps.

This is my dream.

Actually, I believe something like this has already been implemented in the alternative_literals branch: http://openeuphoria.org/ticket/657.wc

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu