A pragmatic language for the future

Started by
609 comments, last by ApochPiQ 16 years, 1 month ago
Quote:Original post by ApochPiQ
This has some interesting properties: optional parameters and variadic-style functions become trivially easy to implement. Further, this provides some very cool tools for metaprogramming. This also basically gives us closures as well as a solid foundation for continuations (combined with some code-location metainformation).


Thoughts?


Yes that does have some great potential, but how would you enforce required parameters? Are you doing away with the concept all together? If you are then you'd have to push parameter validation into the function code which could potentially add a lot of overhead to make sure that you actually get the variables you need. Also, couldn't you duplicate the functionality by simply passing an associative array to the function?
Advertisement
Required parameter checks would be handled at compile-time; they're easy enough to verify statically.


Of course you can just pass associative arrays around, but that has some problems: first, it doesn't allow for easy static enforcement of required parameters; it obfuscates the interface of the function itself; and it adds extra verbosity to the calling side (having to populate the map rather than just listing the function parameters).

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Quote:Original post by ApochPiQ
(P.S. - I know the site is down. For those who don't follow my journal, the machine quit responding to the network and I haven't had a chance to go attach a monitor and such to it to figure out why. I'm also putting it off until I get a solid chunk of time to sit down and finally be rid of that damned TWiki. Stay tuned.)


get a sourceforge account and register a new project for your "proof of concept" programming language, that'll ensure that your project pages are likely to be reachable for everybody who might like to contribute.
Otherwise, I don't see this progressing anywhere if it doesn't go beyond of a fantastic giant discussion thread with dozens of different opinions and ideas. The key now is to start formalizing the various suggestions in order to be able to weigh the pros&cons of each individual suggestions, so that you can actually determine the major objectives of your language, in order to categorize each suggestions accordingly.
I would really love to see this continue, and eventually even contribute contents, however I simply don't feel this is the right place and/or format to actually do so.
Quote:Original post by ApochPiQ
Required parameter checks would be handled at compile-time; they're easy enough to verify statically.


Of course you can just pass associative arrays around, but that has some problems: first, it doesn't allow for easy static enforcement of required parameters; it obfuscates the interface of the function itself; and it adds extra verbosity to the calling side (having to populate the map rather than just listing the function parameters).


Alright, from the example it looked like you were removing required parameters and just treating everything passed in as an associative container. After clarifying this, my second point becomes moot.
I've got a SF project pending approval. We'll see how that turns out.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Quote:Original post by ApochPiQ
Accessing any variable quuxvar becomes equivalent to current_scope["quuxvar"].
This is almost exactly how Python's local, global and object scopes work. Everything is a dictionary mapping from string identifiers to objects. Only the lookup is a bit more complex. If locals dictionary doesn't contain the variable, globals dictionary is then automatically searched next.
Right - many languages already do this (esp. interpreted languages) more or less behind the scenes; a few expose it for metaprogramming at some level. e.g. PHP has a similar model, albeit without any safety. The main thing is using the associative-map concept to directly permit optional parameters, named arguments, variadic-style functions, and so on - plus of course static safety checking as has been established as a major aspect of the language.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Quote:Original post by ApochPiQ
I've got a SF project pending approval. We'll see how that turns out.


got it approved?

and rather than using a (chaotic) wiki again, how about simply using a bugtracker such as bugZilla where people can post ideas/requests and each idea can be discussed separately?

Everything that should be taken into consideration could then be put on the roadmap for an eventual milestone, that way we might end up accumulating not only various ideas nicely separated into categories and milestones, but also directly associated with the proper inter-dependencies, as feature requests might depend on other requests.

So, as a start you would begin formalizing your major goals and other interesting ideas could be categorized into sub groups of the major goals you've set for your language. Ultimately, this would have the potential to dynamically evolve into a clear image of the language, as the various ideas would automatically become cleanly separated into "must have", "important feature" or "nice to have", "entirely optional" etc
BTW: a bug tracker such as bugZilla would also allow for voting of the various requests and ideas.
rant on C++ memory allocation(might be interesting): http://www.scs.cs.nyu.edu/~dm/c++-new.html

This topic is closed to new replies.

Advertisement