features of a compiler

closed account (Dy7SLyTq)
so i know ive been really "noobish" about compiler design, but now im getting seriuos. i bought the purple dragon book and its teaching me a lot. anyways, i just wanted to poll for language features you like (not neccesarily just from c++), for me to implement into my compiler/std library.
closed account (N36fSL3A)
Code blocks.
closed account (Dy7SLyTq)
??? im not talking about intergrating into ides. im talking about the language. i need something for the ide before i think about intergration
closed account (N36fSL3A)
I'm not talking about the IDE. I'm talking about code blocks. Like what go around functions.

1
2
3
4
5
6
7
8
void function()
{ // < Code block


    // stuff


} // < Code block 
closed account (Dy7SLyTq)
sorry my mistake... *facepalm* yeah its going to be c-styled, except im planninng on make it weakly typed javascript style, and declare functions like they do in that langauge too
closed account (Dy7SLyTq)
some of the things i want to include:
-switch
-type switch
-var
-if/elif/else
-println
-readln
-multiplying strings (think ruby)
-file io
-basic data structures
-functions
-extendable with c++
Modules with automatic versioning.

Other than that, people like constructs that do things for them that they would otherwise have to do for themselves.


Very important to get right at the start.
closed account (Dy7SLyTq)
could you explain automatic versioning modules?
OOOooooh ooohhh automatic timeout makes me so MAD!

----

A module should declare its contents and the module version number. That way when your user tries to ask for a module he can require a specific range of module versions, and get one that works or a graceful failure. Automatically.


For example. There is a lot of Python code out there, written for the 2.x interpreters. However, python 3.x interpreters are not backwards compatible, and code written for 2.x will likely not work properly.

As it stands, there is no way for users to automatically choose the correct interpreter based upon the python version of their code.

So when Sara Jane in Wisconsin, who likes playing her Python 2.x Mah-Jongg game, sits down at her computer after Mark, her college student son, has just installed Python 3.x to do his homework, she finds that clicking the Mah-Jongg icon inexplicably fails. And Mark doesn't know how to fix it.

After googling for half an hour he has learned the problem. Two hours later he has learned how to make Mom a shortcut that launches her game using the 2.x interpreter.

A week later he has learned how to revert the system to have the 2.x interpreter in the default PATH and file associations, and create himself a shortcut that starts the command prompt with the 3.x stuff in the PATH. (Fortunately Mark is a bright boy and has a helpful and knowledgeable professor.)

Versioning.
Topic archived. No new replies allowed.