My new programming language.
axilmar

Today was a slow day at work, so I decided to dust off my programming language project. I opened a blog about it.

If anyone is interested in such stuff, you can find the Gold Parser Builder grammar file of the language in there. The grammar seems complete to me, I hope I have not forgotten any important features.

What I'd like to create is a C-like programming language but with all the bells and whistles of modern programming languages: garbage collection, a nice static type system, support object oriented programming with interfaces, support for functional programming, templates, Unicode etc, but without the problems that plug C++ or D.

For a more informative introduction to my language attempt, you can visit the blog.

I will pursue this project in my free time, hoping that I will do enough to create a usable compiler (more like a translator to C). Creating a compiler is a daunting task, so I plan to start with the basic features first, and then build upon them.

Comments would be appreciated.

kazzmir

A C replacement is a good idea and I've been thinking of a similar goal for a while. The list of features in your language (from your blog) make me think you are just recreating ocaml. Is ocaml missing any features you need? Maybe you can just write a C-like grammar and convert straight to ocaml.

Anyway, another nice feature to add is coroutines.

SiegeLord
Quote:

problems that plug ... D

Lack of good debugging facilities, IDE's and buggy compilers?

Instead of those lists, I'd prefer to have a rationale for those features. Like, why do you consider implicit conversions and casts dangerous, but are planning on including duck (note the spelling) typed interfaces, which are arguably just as dangerous? What does 'proper Unicode support' really mean?

Also, it'd be nice to see some code samples (nevermind a lack of a compiler for them), since I'd prefer to look at that rather than the grammar file itself.

Dario ff

This reminds of the time I created my own scripting language. It was ugly, but at least it had a wait command. ;D

Your language sounds promising, good luck with it.

bamccaig

I think I remember you posting about this a while ago. I can't find the thread. Interesting that in 2004 you posted a thread with the exact same title. ;) Your language doesn't sound very modern, considering it has no direct type conversions or references. I can't imagine it being very well adopted.

I would prefer combining the power of C++ with the [default] safety of C# (with a rich standard library that offers all the power of your average modern standard library). That means pointers, references, and values; pointers require unsafe context and both require explicit syntax.

I see no reason to disallow pointer arithmetic (albeit, require unsafe context). What's the difference between your pointers and modern concepts of references?

SiegeLord said:

Also, it'd be nice to see some code samples (nevermind a lack of a compiler for them), since I'd prefer to look at that rather than the grammar file itself.

^ This.

axilmar
kazzmir said:

The list of features in your language (from your blog) make me think you are just recreating ocaml. Is ocaml missing any features you need? Maybe you can just write a C-like grammar and convert straight to ocaml.

From what I read about ocaml, it has some performance overhead. My purpose is to not sacrifice performance. It also has a syntax that is quite different from C, which increases the difficulty of adopting it; personally, I don't really fancy the ';;'.

Quote:

Anyway, another nice feature to add is coroutines.

Do coroutines solve any real world problems more easily than other existing features? I have not used coroutines, but I have seen some examples (e.g. consumer-producer), that can be easily achieved using lambda functions. It's an interesting feature. If you could elaborate on its usefulness...

SiegeLord said:

Lack of good debugging facilities, IDE's and buggy compilers?

Yes.

bamccaig said:

I think I remember you posting about this a while ago. I can't find the thread. Interesting that in 2004 you posted a thread with the exact same title.

Time is a prime factor in what I can do. Right now, the major projects I was working on are finished and in maintenance phase, so I have some free time in my hands.

I'll update my blog with answers to the questions posted here. Thank you for your interest.

Shravan

By the way create an allegro binding for your language. ;)

SiegeLord
Shravan said:

By the way create an allegro binding for your language. ;)

Speaking of which, how will your language be able to bind the ALLEGRO_EVENT union which is rife with pointers? You disallow them in your spec, but clearly some C libraries use that feature.

Kibiz0r
Quote:

You disallow [pointers] in your spec

Quote:

What this language will not have:
...
references; pointers are enough.

SiegeLord
Quote:

You disallow [unions with pointers in them] in your spec

Kibiz0r

Ah.

axilmar
Shravan said:

By the way create an allegro binding for your language.

Let me create the language first :-).

SiegeLord said:

Speaking of which, how will your language be able to bind the ALLEGRO_EVENT union which is rife with pointers? You disallow them in your spec, but clearly some C libraries use that feature.

I don't want to allow pointer arithmetic; if I allow unions of pointers and integers, then I would have no safety. It doesn't matter if a pointer points to a non-gc block, because the collector will have to track pointers to the middle of objects, but pointer arithmetic can result in a wild goose chase, with unpredictable results.

I don't want to do something complicated like ADA's discriminants.

Α solution would be to define a struct compatible with ALLEGRO_EVENT type, then use external C functions to access the pointers in the struct.

By the way, I updated the blog with code samples and a section that explains better why there is no pointer arithmetic, references and casts.

anonymous

I wonder about this:

//pure function; no assignment allowed
pure func swap(a : int, b : int) : [int, int] {
    return [b, a];
}

You mean assignment to the arguments - otherwise I don't see what it has to do with purity?

And are even primitives always going to be passed by reference, as this example (somewhat ill-chosen, IMO) indicates? Are the int's in the returned tuple (?) copies or references of the input?

I also wonder about the "no casts and conversions": e.g I represent the coordinates of a game object as doubles, but I will need to use integers when I want to draw it. So this language won't allow this, as "dangerous"?

kazzmir
axilmar said:

From what I read about ocaml, it has some performance overhead.

Ocaml is strongly typed and can generate very fast code. The only overhead is probably related to garbage collection which you said your language would have as well.

Quote:

It also has a syntax that is quite different from C, which increases the difficulty of adopting it; personally, I don't really fancy the ';;'.

Which is why I said write a C grammar and have your program just translate directly to ocaml.

If ocaml isn't the way to go for you thats ok, but you should at least try it. Reinventing the wheel and all that.

Quote:

Do coroutines solve any real world problems more easily than other existing features?

Mostly I use them for generators, like the `yield' stuff from c# and python. You can build coroutines directly out of continuation primitives (like shift and reset) but I doubt you would create such primitives.

Its always possible to hack together something that looks like `yield' just using lambda and mutation but its usually uglier for the user to use.

bamccaig
anonymous said:

You mean assignment to the arguments - otherwise I don't see what it has to do with purity?

I'm also confused about what a "pure" function is. :-/

anonymous said:

And are even primitives always going to be passed by reference, as this example (somewhat ill-chosen, IMO) indicates?

There will be no primitives, IIRC.

anonymous said:

I also wonder about the "no casts and conversions": e.g I represent the coordinates of a game object as doubles, but I will need to use integers when I want to draw it. So this language won't allow this, as "dangerous"?

It will, but the conversion will need to be explicitly done with a constructor as opposed to casting or implicit conversion.

Arthur Kalliokoski
bamccaig

I still don't see what that has to do with assignment. I do like the language's ability to put said constraint on the function, however.

Jonatan Hedborg
bamccaig said:

I still don't see what that has to do with assignment

If we're talking functional programming here, it's about not changing any global state - the only communication with the function is through the arguments and the return value.

bamccaig

If we're talking functional programming here, it's about not changing any global state - the only communication with the function is through the arguments and the return value.

To meet Wikipedia's definition of a pure function, you can't be affected by global state in any way, meaning that you pretty much can't refer to global state at all. I fail to see where assignment plays any role whatsoever. If you can't refer to global state then you can modify global state. Obviously, you should be free to assign to locals still. Saying "no assignment allowed" makes no sense.

//create inner instances
var it1 = (new List).new Iterator1;

WTF is that... :-X

axilmar
anonymous said:

You mean assignment to the arguments - otherwise I don't see what it has to do with purity?

Traditionally, swap is expressed with one intermediate initialization and two assignments:

template <class T> void swap(T &a, T &b) {
    T temp = a;
    a = b;
    b = temp;
}

Pure functions do not allow assignments, and therefore the swap function should be written as returning a tuple of swapped values, as in the example I posted.

Quote:

And are even primitives always going to be passed by reference, as this example (somewhat ill-chosen, IMO) indicates? Are the int's in the returned tuple (?) copies or references of the input?

No, this is a value-based language. If you want to pass-by-reference, you have to use pointers. Exactly as in C, that is.

Quote:

I also wonder about the "no casts and conversions": e.g I represent the coordinates of a game object as doubles, but I will need to use integers when I want to draw it. So this language won't allow this, as "dangerous"?

It doesn't allow implicit conversions. You can convert a double to an int by instantiating an int from a double, like this:

var d = 0.0;
var i = int(d);

kazzmir said:

Ocaml is strongly typed and can generate very fast code. The only overhead is probably related to garbage collection which you said your language would have as well.

Then the wikipedia article that says Xavier Leroy has cautiously stated that "OCaml delivers at least 50% of the performance of a decent C compiler"[1], and benchmarks have shown that this is generally the case[2]. should be corrected. By the way, Xavier Leroy is the lead developer of Ocaml.

Quote:

Which is why I said write a C grammar and have your program just translate directly to ocaml.

Why not translate directly to C then? I wouldn't wish to depend on anything else than gcc, which is available for most platforms.

Quote:

Mostly I use them for generators

Hmmmm...according to what generators do, the same thing can be implemented using lambdas. It's a sort of lazy computation that is threaded with external algorithms...I am not sure that this requires a specific language construct. Since the language has lambda functions, lazy computations are easy to define and encapsulate into algorithms.

bamccaig said:

I still don't see what that has to do with assignment.

Assignment is called 'destructive update' in FP lingo, which is really bad from an FP perspective. In short, assignment forces a specific order of evaluation, which can result in intractable problems. Having the ability to have pure functions allows the user to avoid the problems.

Pure functions, by definition, can only invoke other pure functions, and therefore the whole computation becomes much easier to optimize and reason about. At least that's what they say.

Vanneto

I think he got pure functions wrong, as far as I understand as long as you don't modify the global state you are free to do anything you want in the function.

Simply put, a pure function is a function that returns exactly the same output for a constant input. sin,strlen are both pure functions yet I doubt they don't have local variables.

EDIT:
Then again, its your programming language. Call it whatever you want. :P

bamccaig
axilmar said:

Assignment is called 'destructive update' in FP lingo, which is really bad from an FP perspective. In short, assignment forces a specific order of evaluation, which can result in intractable problems. Having the ability to have pure functions allows the user to avoid the problems.

Pure functions, by definition, can only invoke other pure functions, and therefore the whole computation becomes much easier to optimize and reason about. At least that's what they say.

What exactly can a function that can't assign to anything even do? ??? Unless I'm missing something, you're pretty much limited to returning some expression... :-/ If nothing in your function or the functions it can call can do any assignment then you're pretty much just making a wrapper that does nothing. :P

I like the idea of being able to have the compiler ensure that a particular function (or Hell, class) can't have any global state. That's what I think pure should do.

Arthur Kalliokoski

A pure function is like a mathematical function, j = f(x);
You can assign j however you want after the function returns, but f(x) itself doesn't access anything except x and returns j (except its own intermediate temp locals or whatever).

SiegeLord

Well, the ability to write imperative code inside pure functions is touted as a feature of D2, so that tells me that axilmar is right about the (lets say 'classical') pure functions to be as restrictive as that comment says. Perhaps some Haskell or some other FP person can explain this?

bamccaig

    //assignments; assignments are not expressions, 
    //in order to avoid errors like "if (x = 5)..."

C# handles that in a better way, IMHO. Conditional expressions must be Boolean so the compiler will error most of the time (the exception would be for an actual Boolean assignment expression). If that's what you really wanted then you would need to say if((x = 5) != 0) or something like that. It can be a pain to get used to at first when checking for null references, but overall I think it's a good rule and a better compromise than disallowing assignments as expressions.

It can be argued that you never need assignment in a conditional expression, but I find there are times when it's cleaner.

func main() {
    print("hello world");
}

Can main accept arguments directly and can it return an exit status?

Note: the blog seems to have eaten text following <>. Also, why are you using the BASIC-like not-equal-to operator?

    //for each
    foreach(var i; [1, 2, 3, 4]) { print(i);}

Is there going to be an interface that you can implement to make a user-defined type usable with foreach?

Jonny Cook

I made a little scripting language once, however it was more just a fun learning experience than a real tool. But now at least I feel like I understand how hard it is to do. So good luck! It sounds like a very ambitions project.

anonymous
bamccaig said:

What exactly can a function that can't assign to anything even do? ??? Unless I'm missing something, you're pretty much limited to returning some expression... :-/ If nothing in your function or the functions it can call can do any assignment then you're pretty much just making a wrapper that does nothing. :P

I suppose you'll mostly do things with recursion. E.g fibonacci numbers would look like:

def fib(n):
    if n < 2: return n
    else: return fib(n - 1) + fib(n - 2)

This probably means that some kind of automatic memoization must be used, so that functions of this kind wouldn't end up with terrible algorithmic complexity.

Personally I wouldn't mind compiler-checked "pure" functions that 1) only allow locals to be used, 2) only allows other pure functions to be called, 3) if an argument is a pointer/reference, it must be const. However, a pure function is not supposed to have any side-effects, but isn't the creation of a local object a side-effect in itself?

Jonatan Hedborg

My biggest gripe with "pure functional languages" is the lack of loops and local variables. I can't for my life see how those would impair the "pureness" in any way. I can totally see why pure functional methods can be useful (though impossible to do anything useful with, on itself), but why cripple yourself? Simply wanting to emulate a mathematical function is not reason enough imo.

axilmar
Vanneto said:

I think he got pure functions wrong, as far as I understand as long as you don't modify the global state you are free to do anything you want in the function.

Simply put, a pure function is a function that returns exactly the same output for a constant input.sin,strlen are both pure functions yet I doubt they don't have local variables.

The definition of pureness is quite tricky, and I admit that when I first read it, my interpretation was similar to yours. Unfortunately, it is not correct. Pureness must exist in all levels, inside and outside of the function in order to be considered pure. In short, strlen is definitely not pure. I do not know about 'sin'.

bamccaig said:

What exactly can a function that can't assign to anything even do? If nothing in your function or the functions it can call can do any assignment then you're pretty much just making a wrapper that does nothing.

Haskell is 100% pure, but it is Turing complete. You can do anything with a pure function. Pure functions allow variable initializations.

Quote:

I like the idea of being able to have the compiler ensure that a particular function (or Hell, class) can't have any global state. That's what I think pure should do.

That's what pure is about. It can make whole functions and classes pure.

bamccaig said:

C# handles that in a better way, IMHO. Conditional expressions must be Boolean so the compiler will error most of the time (the exception would be for an actual Boolean assignment expression). If that's what you really wanted then you would need to say if((x = 5) != 0) or something like that. It can be a pain to get used to at first when checking for null references, but overall I think it's a good rule and a better compromise than disallowing assignments as expressions.

In the way you propose it, you can always write (if (x = 5) == true). My purpose is to enforce some good programming practices as well as help reasoning about the program...that's why assignments are in between statements and expressions. It's very easy to misidentify '=' for '=='.

Quote:

Can main accept arguments directly and can it return an exit status?

Main's formal signature is:

func main(args : array[string] = array[string]()) : int;

It's just a wrapper over C's main function.

Quote:

Is there going to be an interface that you can implement to make a user-defined type usable with foreach?

Yes. You can overload operator foreach.

So good luck! It sounds like a very ambitions project.

Thank you. It's really a time consuming project. I will be lucky if I reach the translator to C stage.

anonymous said:

However, a pure function is not supposed to have any side-effects, but isn't the creation of a local object a side-effect in itself?

It is not, because the local object is not accessible from the outside world.

My biggest gripe with "pure functional languages" is the lack of loops and local variables. I can't for my life see how those would impair the "pureness" in any way. I can totally see why pure functional methods can be useful (though impossible to do anything useful with, on itself), but why cripple yourself? Simply wanting to emulate a mathematical function is not reason enough imo.

That's my gripe as well. For me, Haskell is really difficult. I have a big problem writing complex Haskell applications. My mind is simply not powerful enough to combine all the individual solutions in one big loop, for example, in gui applications.

Jonatan Hedborg
axilmar said:

Haskell is 100% pure, but it is Turing complete. You can do anything with a pure function.

You cant read stuff from the keyboard/internet/random number generator.

That's why haskell isn't a 100% pure functional language - it has some language construct to say that a function is non-pure... Can't remember what it is at the moment.

axilmar

You cant read stuff from the keyboard/internet/random number generator.

Yes, you can, using PerformUnsafeIO.

Quote:

That's why haskell isn't a 100% pure functional language - it has some language construct to say that a function is non-pure... Can't remember what it is at the moment.

Ok, now I understand what you meant. Indeed, no language can be 100% pure in that sense.

I've started my informal specs with a discussion about modules.

Dustin Dettmer

Show us some example code :D

axilmar

Show us some example code

I've written a post in my blog with plenty of code samples.

Vanneto
func main()
{
    ...
}

Really? Is the tion really so hard to type? Can't it just be function?

axilmar
Vanneto said:

Really? Is the tion really so hard to type? Can't it just be function?

Yes, it could be. But then, for consistency, I would have to expand all keywords: 'variable' instead of 'var', 'type_definition' instead of 'typedef', 'thread_specific' instead of 'threadspec', 'linkage_specification' instead of 'linkspec', 'constant' instead of 'const', 'enumeration' instead of 'enum' etc.

I actually wanted to be 'fun', but 'fun' is a specific English word, so it's not really suitable for this.

bamccaig

http://axilmarpl.blogspot.com/2010/01/specs-part-1-modules.html?showComment=1264690146368#c2095125692262182123

** EDIT **

Commenting on the blog seems too spammy.

This is very useful because it allows importing a whole bunch of modules with a single statement; for example, if one wanted to make a GUI application, he did not have to import every child module of the gui submodule; a simple statement like this:

import std.gui;

would be more than enough to import any necessary module for gui development.

Although you'll probably never need to import std.gui because you'll probably have imported std for something (maybe a printf equivalent) and that means everything in the std module (which I assume is the standard library) is already imported, perhaps gui, net, security, xml, etc., etc., etc.!

IMHO, with that model, you might as well not even have an import statement and just import everything in the import path automatically, compile-time be damned (perhaps you can use a cache with a special command to update it to improve performance). I suspect that's what you'll end up with much of the time anyway, but with meaningless import statements littering all of the source files.

As I said in the blog comments, I think it makes better sense to not implicitly import sub-modules.

:-/

See also: [1] [2] [3]

Edit: Unless I'm completely misunderstanding modules. I see them as namespaces, which when imported bring their declarations and definitions into the global namespace. If it only loads the modules into a module wrapper (such that you need to access everything through the module name) then I guess the only real harm is performance, which as I suggested, can be improved with a cache.

But there is a difference: in this language, the code inside the [class section] has access to the variables defined in the ... class!

...

Since a section is like a class, it can have its own return and assignment operators.

Now 'sections' are interesting. What was the inspiration for them?

And how does the 'return' operator work? It strikes me as being similar to default properties in *shudder* Visual Basic. At first I thought it was a cool feature, but ultimately decided it really wasn't. How do you differentiate between, for example, wanting to pass the object and wanting to pass the result of the return operator?

#SelectExpand
1class Foo 2{ 3 var x_ : int; 4public: 5 func constructor(int x) 6 { 7 this.x_ = x; 8 } 9 10 func operator return () : int 11 { 12 return this.x_; 13 } 14} 15 16func someFunction(x : int) 17{ 18 /* ...etc... */ 19} 20 21func someFunction(f : Foo) 22{ 23 /* ...etc ... */ 24} 25 26... 27 28var o : Foo(5); // I'm not sure about syntax. 29 30someFunction(o); // Which someFunction is called?

Dustin Dettmer

I skimmed the blog post but the example code was sparse. In reality I don't have time to study your (potentially) cool new language :P.

If you had an example program (100 lines or so) I could grasp a good deal of your language quickly (which is all I have time for).

axilmar

bamccaig,

I don't think that there is going to be a problem with the module system. If the modules are organized hierarchically and in a proper manner, then the programmer will have the options of importing either single modules (i.e. modules without children) or a parent module that includes everything else.

The standard library, if there is one, will not be named std, but something along pl.system.collections, pl.system.types, pl.system.gc etc, allowing you to import whatever you want at the level you want it.

bamccaig said:

Now 'sections' are interesting. What was the inspiration for them?

Writing properties in c++.

Quote:

And how does the 'return' operator work? It strikes me as being similar to default properties in shudder Visual Basic. At first I thought it was a cool feature, but ultimately decided it really wasn't. How do you differentiate between, for example, wanting to pass the object and wanting to pass the result of the return operator?

The return operator is the same as the 'operator type' in c++: when an evaluation of a value to that type is requested, the return operator is invoked. I did not do it like c++ for syntax consistency reasons. You can think of the return operator as a conversion to a specific type.

Quote:

var o : Foo(5); // I'm not sure about syntax.

It's

var o = Foo(5);

Quote:

someFunction(o); // Which someFunction is called?

The function 'someFunction(Foo)' is called.

If you had an example program (100 lines or so)

What would you like to see?

van_houtte

fyi this thread was created on monday by somebody who runs gentoo, take this as you will.
;D

bamccaig
axilmar said:

If the modules are organized hierarchically and in a proper manner, then the programmer will have the options of importing either single modules (i.e. modules without children) or a parent module that includes everything else.

OK, now I understand better. It's almost akin to creating a main header file for a library that includes all of the other header files. In other words, top-level modules should only contain the bare essential code that doesn't fit elsewhere, but as much as possible should be neatly organized into sub-modules?

Vanneto

Includes and imports are overrated. Why not just let the compiler decide from the code written what it should import? We have powerfull CPUs and lots of memory. All those header files. Yeesh.

Get on with the time. ;)

axilmar
bamccaig said:

OK, now I understand better. It's almost akin to creating a main header file for a library that includes all of the other header files. In other words, top-level modules should only contain the bare essential code that doesn't fit elsewhere, but as much as possible should be neatly organized into sub-modules?

Yeap.

...

After much thinking, and thanks to this discussion, I decided to enable 3 crucial unsafe operations in my language. The operations are enabled only when they are marked 'unsafe', which will be turned off by a compiler switch.

The 3 operations are:

1. pointer arithmetic.
2. pointers in unions.
3. casts.

Here is how to use them in the code:

#SelectExpand
1//unsafe ptr declaration 2var p : unsafe *int; 3 4//pointer arithmetic using unsafe pointers; 5//normally this is not allowed. 6p++; 7 8//pointers in unions 9typedef ALLEGRO_DISPLAY_EVENT : unsafe union { 10 id : ALLEGRO_EVENT_ID, 11 source : *ALLEGRO_DISPLAY, 12 ... 13}; 14typedef ALLEGRO_EVENT : unsafe union { 15 ALLEGRO_DISPLAY_EVENT, 16 ALLEGRO_JOYSTICK_EVENT, 17 .... 18}; 19 20//unsafe casts 21var i = unsafe(int)p;

I decided to add these unsafe operations for the following reasons:

1) in order to eliminate much boilerplate code that would be required otherwise. This allows Allegro5 to be directly written in this language, without writing anything in C.

2) enable the programmer to directly use external C functions that require these operations. For example, using malloc to allocate memory for a class and then casting the result to the appropriate type.

EDIT:

I uploaded a sample source code file that contains the struct and union declarations for Allegro5 events. The file is parsed using the grammar without error.

SiegeLord

What sort of compile time introspection will you support? In D I can have a struct, and using its introspection abilities can generate a manager class that can do stuff to the structs variables (using the variables' types and names to determine what exactly needs to be done), check to see what function are defined in it etc etc. This is definitely a critical feature for me.

Or perhaps this is for the future features? AxPL 2 perhaps?

Dustin Dettmer
axilmar said:

What would you like to see?

How about Tetris or Pong?

Jeff Bernard
axilmar said:

What would you like to see?

How about Tetris or Pong?

An MMORPG that can be used as a code example for every type of game. You should prolly team up with piccolo and port The Game.

Matthew Leverton
SiegeLord said:

In D I can have a struct, and using its introspection abilities can generate a manager class that can do stuff to the structs variables (using the variables' types and names to determine what exactly needs to be done), check to see what function are defined in it etc etc.

Can you provide a link that shows source code examples of this?

Oscar Giner
Vanneto said:

Includes and imports are overrated. Why not just let the compiler decide from the code written what it should import? We have powerfull CPUs and lots of memory. All those header files. Yeesh.

There are already languages that do it. Eiffel for example. It automatically compiles all classes that your program uses.

About Pure funcions, it's something similar to Referential transparency? It looks like Pure functions have more constraints though.

SiegeLord

Can you provide a link that shows source code examples of this?

No, but here's a quick example I whipped up right now. It's inane, and you'd probably want to make the manager classes implement some sort of interface, so that you don't actually need to know their names.

#SelectExpand
1import tango.io.Stdout; 2import struct_wrapper; 3 4struct StructA 5{ 6 int x = 0; 7 int y = 0; 8 double z = 0; 9} 10 11struct StructB 12{ 13 int x = 0; 14 15 void Negate() 16 { 17 x = -x; 18 } 19} 20 21mixin(WrapStruct!("StructA")); //Creates a class called StructAManager 22mixin(WrapStruct!("StructB")); //Creates a class called StructBManager 23 24void main() 25{ 26 StructA a; 27 StructB b; 28 29 auto a_manager = new StructAManager(); 30 auto b_manager = new StructBManager(); 31 32 a_manager.IncrementDoubles(a); 33 a_manager.IncrementIntegers(a); 34 a_manager.Negate(a); 35 36 Stdout.formatln("{} {} {}", a.x, a.y, a.z); // 1 1 1.00 37 38 b_manager.IncrementDoubles(b); 39 b_manager.IncrementIntegers(b); 40 b_manager.Negate(b); 41 42 Stdout.formatln("{}", b.x); // -1 43}

#SelectExpand
1module struct_wrapper; 2 3public import utils; 4 5/* 6 * WrapStruct is required to instantiate the WrapStruct2 mixin at the scope 7 * of the struct that we are wrapping 8 */ 9char[] WrapStruct(char[] struct_name)() 10{ 11 return 12`mixin WrapStruct2!("` ~ struct_name ~ `")` ~ struct_name ~ `dummy; 13mixin(`~ struct_name ~ `dummy.Gen()); 14`; 15} 16 17template WrapStruct2(char[] struct_name) 18{ 19 char[] Gen() 20 { 21 char[] ret; 22 23 auto names = GetNamesInAlias!(mixin(struct_name))(); 24 auto types = GetTypesInAlias!(mixin(struct_name))(); 25 const n = mixin(struct_name).tupleof.length; 26 27 char[][] integers; 28 char[][] doubles; 29 30 for(int ii = 0; ii < n; ii++) 31 { 32 switch(types[ii]) 33 { 34 case "int": 35 integers ~= names[ii]; 36 break; 37 case "double": 38 doubles ~= names[ii]; 39 break; 40 default: 41 } 42 } 43 44 ret ~= 45`class ` ~ struct_name ~ `Manager 46{ 47 void IncrementIntegers(ref ` ~ struct_name ~ ` strct) 48 { 49`; 50 foreach(val; integers) 51 { 52 ret ~= 53` strct.` ~ val ~ ` += 1; 54`; 55 } 56 ret ~= 57` } 58 59 void IncrementDoubles(ref ` ~ struct_name ~ ` strct) 60 { 61`; 62 foreach(val; doubles) 63 { 64 ret ~= `strct.` ~ val ~ ` += 1.0; 65`; 66 } 67 ret ~= 68` } 69 70 void Negate(ref ` ~ struct_name ~ ` strct) 71 { 72`; 73 if(mixin(`is(typeof(` ~ struct_name ~ `.Negate))`)) 74 { 75 ret ~= 76` strct.Negate(); 77`; 78 } 79 ret ~= 80` } 81}`; 82 return ret; 83 } 84}

axilmar
SiegeLord said:

What sort of compile time introspection will you support?

Introspection is planned from day 1. You will be able to create instances, call their methods, get and set their members through introspection. Introspection will work both at class level and at module level.

Quote:

How about Tetris or Pong?

I'll try a Pong game, which seems easier than Tetris.

About Pure funcions, it's something similar to Referential transparency [en.wikipedia.org]? It looks like Pure functions have more constraints though.

Pure functions is exactly the same as referential transparency.

EDIT:

I attached a Pong game; I don't know if it would run, but it checks out ok in the gold parser.

Thomas Fjellstrom

You realize that .pl has been used by perl scripts since day one right? (20+ years)

BAF

Why does implementing Allegro require pointer arithmetic? Or unions (I never really did find a valid use for them)?

axilmar

You realize that .pl has been used by perl scripts since day one right? (20+ years)

I do not intent to name my language 'pl'. I haven't given a name to it yet. 'Pl' is a working title.

Thomas Fjellstrom
axilmar said:

I do not intent to name my language 'pl'. I haven't given a name to it yet. 'Pl' is a working title.

I'm talking about the file extension. Its in use ;)

BAF

No response to my question?

axilmar

I'm talking about the file extension. Its in use

The file extension will be like the language name, just like in c/c++/java/d.

BAF said:

Why does implementing Allegro require pointer arithmetic? Or unions (I never really did find a valid use for them)?

The Allegro devs should answer this question.

Thomas Fjellstrom
axilmar said:

The file extension will be like the language name, just like in c/c++/java/d.

I'm just saying that the file you attached, was named with a .pl, and it obviously wasn't Perl ;)

axilmar

I did not know that Perl source files end in PL. Obviously, PL means Programming Language.

Thomas Fjellstrom
axilmar said:

I did not know that Perl source files end in PL. Obviously, PL means Programming Language.

Your file was .pl, not .PL ;) But perl Makefile.PL files use .PL, so that could be considered "taken" as well ;)

Dustin Dettmer

I'm going to quickly register all untaken the 2 letter extensions and charge royalties to all who use them! >:(

SiegeLord
BAF said:

Why does implementing Allegro require pointer arithmetic? Or unions (I never really did find a valid use for them)?

Well, in principle everything could be implemented using a few goto's in a single function... so Allegro does not require those two features. However, when used they solve two problems which would not as easily or cleanly solvable without them.

For pointer arithmetic, I know one spot that uses them is the primitives addon. For example the function al_calculate_arc allows you to calculate the points on an arc. For maximum flexibility, the function requires regularly spaced pairs of floats... this allows for the coordinates to be actually embedded in some complicated structure. Thus, there is a stride parameter which governs the spacing between successive pairs of floats. I can't think of any other solution which would support this calling convention, which is clean and lightweight:

al_calculate_arc(&my_vtx_array[0].x, sizeof(MY_VERTEX), 0, 0, 1, 1, 0, 2 * AL_PI, -1, 10);

For unions, the place they are used are the ALLEGRO_EVENT's. The primary reason they are used here, I think, is to avoid pointers and casts that would otherwise be required to do the necessary inheritance in C.

With unions we can do this:

#SelectExpand
1ALLEGRO_EVENT event; 2al_get_next_event(queue, &event); 3switch(event.type) 4{ 5 case ALLEGRO_EVENT_KEY_DOWN: 6 switch(event.keyboard.keycode) 7 { 8 9 } 10 break; 11 case ALLEGRO_EVENT_MOUSE_AXES: 12 { 13 do_something_with_mouse(event.mouse.x, event.mouse.y); 14 } 15 break; 16}

Without unions we'd have to do this:

#SelectExpand
1ALLEGRO_EVENT* event; 2al_get_next_event(queue, &event); 3switch(event->type) 4{ 5 case ALLEGRO_EVENT_KEY_DOWN: 6 switch(((ALLEGRO_KEYBOARD_EVENT*)event)->keycode) 7 { 8 9 } 10 break; 11 case ALLEGRO_EVENT_MOUSE_AXES: 12 { 13 ALLEGRO_MOUSE_EVENT* mev = (ALLEGRO_MOUSE_EVENT*)event; 14 do_something_with_mouse(mev->x, mev->y); 15 } 16 break; 17}

The first seems cleaner to me.

axilmar

Your file was .pl, not .PL ;) But perl Makefile.PL files use .PL, so that could be considered "taken" as well ;)

I am not going to name my language 'pl' or 'PL' anyway.

I'm going to quickly register all untaken the 2 letter extensions and charge royalties to all who use them!

Did you have a look at the Pong program? what do you think about the language? did you like it? any suggestions? things you would do differently?

SiegeLord said:

I can't think of any other solution which would support this calling convention, which is clean and lightweight:

Wouldn't arrays do the job in this case?

Quote:

The primary reason they are used here, I think, is to avoid pointers and casts that would otherwise be required to do the necessary inheritance in C.

Another reason is memory management. With a union, you can declare the event struct in the local stack; with the inheritance solution, you receive a struct pointer, and you don't know how the memory is handled; you may either have to free it yourself, call an API function to free it etc.

BAF

I don't see where your example uses pointer arithmetic. It uses pointers, but it could just as easily have used references.

As far as unions, it looks more like a hack to me, and an ugly one at that. With proper inheritance, you wouldn't need to do that. I would rather use event handlers that get sent the most specific event type that is applicable anyway rather than a generic event loop.

As far as memory management, with a garbage collected language, you don't have to worry about things like this.

SiegeLord
axilmar said:

Wouldn't arrays do the job in this case?

I don't see how. Say I have a struct like this:

struct MyVertext
{
    float x, y;
    ALLEGRO_COLOR color;
}

I don't see a way around using stride (and thus pointer arithmetic) that would allow a generic function to access those x and y fields.

BAF said:

As far as memory management, with a garbage collected language, you don't have to worry about things like this.

We are talking about the language Allegro is written in which is C. The reason Axilmar's PL would benefit from supporting these two features is that it would be easy to bind C libraries. I remember quite well what major pain it was to bind ALLEGRO_EVENT structure in C# for the two bindings that were made for it, all because C# does not directly support those kind of structures.

axilmar
SiegeLord said:

The reason Axilmar's PL would benefit from supporting these two features is that it would be easy to bind C libraries. I remember quite well what major pain it was to bind ALLEGRO_EVENT structure in C# for the two bindings that were made for it, all because C# does not directly support those kind of structures.

It is a major benefit if you can map directly the C structs in the more advanced language.

bamccaig
SiegeLord said:

I don't see a way around using stride (and thus pointer arithmetic) that would allow a generic function to access those x and y fields.

#SelectExpand
1void some_function(int some_arg, int count, ...) 2{ 3 va_list ap; 4 5 va_start(ap, count); 6 7 some_vfunction(some_arg, count, ap); 8 9 va_end(ap); 10} 11 12void some_vfunction(int some_arg, int count, va_list ap) 13{ 14 int i; 15 16 for(i=0; i<count; i++) 17 { 18 type * element = va_arg(ap, type *); 19 20 ... 21 } 22}

some_function(some_value, array_size, array[0], array[1], array[2], array[3],
        array[4], array[5], array[6], array[7], array[8]);

:P

Disclaimer: I just woke up about an hour ago.
Disclaimer II: This code is not to be taken seriously.

axilmar
SiegeLord said:

I don't see how.

In C++, you can do it with template arrays. You are probably talking about C though.

Tobias Dammers
axilmar said:

About Pure funcions, it's something similar to Referential transparency [en.wikipedia.org]? It looks like Pure functions have more constraints though.

I think the usefulness of pure functions lies in the facts that they are
a) completely deterministic, and
b) entirely stateless
The function call and the function definition are enough to determine exactly what the output will be.
The fact that they are stateless makes them perfect for multi-threaded programming: rule out state, and all your code is naturally thread-safe (because there is no state another thread could mess with).

BAF said:

As far as unions, it looks more like a hack to me, and an ugly one at that.

Unions have a place in a language like C, where physical memory is transparent to the programmer. In a higher-level language, the entire concept is pretty meaningless, at least if it abstracts memory management details away from the programmer - after all, the actual bit representation of any data type is not typically documented and may change across platforms.

SiegeLord
bamccaig said:

type * element = va_arg(ap, type *);

And how do you propose passing type to the function?

axilmar said:

In C++, you can do it with template arrays. You are probably talking about C though.

I am. This would be a cinch in C++ (or most any other language).

Now, back on topic:

The Blog said:

foo(1, 0);
foo(a = 1, x = 0);
foo(, 0);
foo(,x = 0);

The last invocation seems to partially defeat the purpose of named parameters. Why can't it be just foo(x = 0)? Can you do foo(x = 0, a = 1)? What about this:

/*
Is function overloading even supported?
*/
func foo(a : double, x = 0);
func foo(a : int, x = 0);

foo(,x = 5); //how to disambiguate?

The Blog said:

If the type is omitted, and the initializer expression is omitted as well, then the function becomes a template; the type of the variable will be deduced when the function is invoked.

So no default template arguments? And why the duplication of template declaration syntax?

Quote:

//constant variable declared using const type
var PI : const double = 3.14;

//constant variable declared using keyword
const PI = 3.14;

That seems backwards too me. Why not const var PI : double = 3.14? Or even const PI : double = 3.14 (const is on the same level as var)?

Also, you had no mention of closures in your function spec.

bamccaig
SiegeLord said:

And how do you propose passing type to the function?

I assumed the function must already know about type in the current implementations as well. I don't know much about the C inheritance h4x, but I assume there is no template/generic h4x unless you use macros. Anyway, I don't fully understand the advanced C used in the Allegro library.

Dustin Dettmer
axilmar said:

Did you have a look at the Pong program? what do you think about the language? did you like it? any suggestions? things you would do differently?

It looked a lot like C++, I didn't notice anything particularly interesting in the pong game (I might have missed something). Maybe you could over-engineer the pong game to use more cool features of the language?

Vanneto

Indeed, I meant to say that too, thought it was too rude. That Pong game looks exactly as ugly as anything written in C++ (maybe more). Not one bit different or innovative. :P

bamccaig

He seems to have written it in a very C-like or C++-like way. :P Maybe that's because he doesn't have working compiler for his language to experiment with. :-/

axilmar

The fact that they are stateless makes them perfect for multi-threaded programming: rule out state, and all your code is naturally thread-safe (because there is no state another thread could mess with).

Indeed. The above is also valid even if you do not use threads, because modern CPUs may thread your computations.

SiegeLord said:

The last invocation seems to partially defeat the purpose of named parameters. Why can't it be just foo(x = 0)? Can you do foo(x = 0, a = 1)?

Yes, you can do that.

Quote:

What about this:

/*
Is function overloading even supported?
*/
func foo(a : double, x = 0);
func foo(a : int, x = 0);

foo(,x = 5); //how to disambiguate?

The above is invalid, because 'a', which is the omitted argument, does not have a default parameter value. I bet you meant something like this:

func foo(a = 3.14, x = 0);
func foo(a = 0, x = 0);
foo(,x = 5); //how to disambiguate?

Well, you can't disambiguate over the two functions. You will have to do a=0 or a=0.0 to solve the problem.

Quote:

So no default template arguments?

Yes, you can do default template arguments, like this:

func foo[T](a = T(), x = 0) {}

Quote:

And why the duplication of template declaration syntax?

Convenience. You can do this:

func max(a, b) { return a > b ? a  : b; }

without having to declare type parameters.

Quote:

Why not const var PI : double = 3.14

The 'var' can be ommitted since it is a constant variable anyway.

Quote:

Or even const PI : double = 3.14

The type is not required, since the init expression is obligatory. But I will put the type spec as optional, for consistency.

Quote:

Also, you had no mention of closures in your function spec.

The language will have nested classes, anonymous classes and anonymous functions which will capture the context. I will expand on this at the appropriate section of the specs.

Maybe you could over-engineer the pong game to use more cool features of the language?

I do not think I can do anything more interesting with Pong. If you have an idea that is within the 100-200 lines of code range, I will definitely write an example.

Vanneto said:

That Pong game looks exactly as ugly as anything written in C++ (maybe more). Not one bit different or innovative.

Well, there are no more things left to be discovered in computer science. There hasn't been a new truly new idea for decades. My language is certainly another evolutionary step in the line of C-derived languages, with ideas collected from the broad spectrum of existing languages. That is not bad for me, because I want a language that I can trust and that it allows a large class of programs to be easily created.

bamccaig said:

He seems to have written it in a very C-like or C++-like way. :P Maybe that's because he doesn't have working compiler for his language to experiment with.

I already have the parser, but, as it is obvious from the blog, this language is basically what I wanted from c++ (and if you remember any of my older allegro.cc posts, I frequently talked about how I wanted c++ to be).

But please, don't let this stop you from proposing new features and criticizing existing ones. I am open to suggestions, and I am interesting to new ideas and useful features that can be added to the language. I have already added some features that make it easier to interface with C programs.

SiegeLord
axilmar said:

The 'var' can be ommitted since it is a constant variable anyway.

I was objecting to the const being on the right side of the colon, since I think that constness of a variable has nothing to do with the type, and therefore should be on the left side of the colon.

bamccaig

Do constant variables have to refer to a literal or existing constant expression (i.e., another constant variable) or can any value be used for a constant variable? It's one of those things in C or C++ that bother me because you may want to declare some unchanging value that isn't based on any literals, but you can't declare it as constant (the closest thing is a macro, which is ugly).

// In C++, not allowed:
const Color RED = Color(255, 0, 0);

// For example:
const RED = Color(255, 0, 0);

I think I recall seeing an example used like this, but I just looked in the variables post on the blog and it doesn't seem to be mentioned.

SiegeLord

Or, to rephrase, will you support CTFE?

anonymous
bamccaig said:

// In C++, not allowed:
const Color RED = Color(255, 0, 0);

You may post this as a separate question, but you most certainly can do it:

class Color
{
    unsigned char r, g, b;
public:
    Color(unsigned char r, unsigned char g, unsigned char b): r(r), g(g), b(b) {}
};

int main()
{
    const Color RED = Color(255, 0, 0); //initialization, not assignment

}

You can also do it for constant class members (initialization list).

bamccaig

I could swear that didn't work last time I tried... :-/ WTF... >:(

axilmar
SiegeLord said:

I was objecting to the const being on the right side of the colon, since I think that constness of a variable has nothing to do with the type, and therefore should be on the left side of the colon.

Actually, this language will have const types, not const variables. In my opinion, constness belongs to types.

I am allowing the 'const var x = y' declaration as a shortcut (and I actually changed the grammar to have an obligatory 'var' after 'const', for consistency reasons).

bamccaig said:

Do constant variables have to refer to a literal or existing constant expression (i.e., another constant variable) or can any value be used for a constant variable?

Any value can be used for a constant variable. The syntax

var x = y;

simply constructs value 'y' with label 'x' attached to it.

SiegeLord said:

Or, to rephrase, will you support CTFE?

No. Constants are computed at run-time. The optimizer might compute them at compile time, but the values are not to be available at compile time.

The orthogonal approach to compile-time computations is to use macros. I have some ideas about that, but I would like to leave this complicated topic at the end.

Arthur Kalliokoski
axilmar said:

The above is also valid even if you do not use threads, because modern CPUs may thread your computations.

I thought a single threaded program only ran on a single thread, although it may move from core to core after task switches. I've never noticed a math speed up for single threaded, although two cores would have 50% load each instead of one core having 100%.

axilmar

I thought a single threaded program only ran on a single thread, although it may move from core to core after task switches. I've never noticed a math speed up for single threaded, although two cores would have 50% load each instead of one core having 100%.

I meant out-of-order execution.

SiegeLord
axilmar said:

const var x = y

Why not var x : const = y then? Shortcuts are nice, but they should be done in a fashion consistent with the rest of the language. If you are going to allow that syntax, why not allow the int var x = y too?

BAF

I still say pointer arithmetic is unnecessary when replaced with cleaner conventions. As are unions. My whole point in questioning them was the quote that these features would enable Allegro to be written directly in the new language, without doing anything in C. I'm claiming that with a cleaner/higher level language (which I thought was what this was) you could still write Allegro in said language without shitty pointer arithmetic, unions, etc.

GullRaDriel

And lose all the portability/compatibility.

axilmar
SiegeLord said:

Why not var x : const = y then? Shortcuts are nice, but they should be done in a fashion consistent with the rest of the language. If you are going to allow that syntax, why not allow the int var x = y too?

1) const is a derived type, int is not.

2) you get const for free in the grammar, due to attribute syntax. No such lack for types. Putting the type before the var name prohibits a context free grammar.

3) 'var x : const = y' is a nice idea and I will adopt it. I will remove the 'const var x = y'.

BAF said:

I still say pointer arithmetic is unnecessary when replaced with cleaner conventions. As are unions. My whole point in questioning them was the quote that these features would enable Allegro to be written directly in the new language, without doing anything in C. I'm claiming that with a cleaner/higher level language (which I thought was what this was) you could still write Allegro in said language without shitty pointer arithmetic, unions, etc.

You are talking about two different things: 1) a higher level interface to Allegro5, 2) a direct interface to Allegro5. The unsafe features of this language allow #2; without those features, it would not be possible to do #2. You can always do #1 and avoid the unsafe features.

For those that are interested, I've written a large post in the blog about classes.

BAF

I'm not talking about Allegro5 in C form. You were claiming these features were necessary to implement Allegro5 in your language (unless I read it wrong, it sounded to me like you were speaking more in theory, discussing the it being possible to write Allegro5 itself in your language). I'm claiming you only need those features to interface to other crap that uses them, but to re-implement, they can be replaced with much cleaner alternatives.

Thomas Fjellstrom
BAF said:

but to re-implement, they can be replaced with much cleaner alternatives.

I'll bet allegro's "hacky" event implementation beats the pants off of anything you can come up with in C++/C# performance wise. Its also thread safe, so keep that in mind.

axilmar
BAF said:

I'm claiming you only need those features to interface to other crap that uses them, but to re-implement, they can be replaced with much cleaner alternatives.

Certainly. But C is the Lingua Franca of computers. It's bad, but there is nothing we can do about it...

BAF

So it seems I just misunderstood what you were saying. :P

I'll bet allegro's "hacky" event implementation beats the pants off of anything you can come up with in C++/C# performance wise. Its also thread safe, so keep that in mind.

Maybe so, but it wouldn't matter too much. Plain old events in C# (language level feature) would be plenty fast enough. I'll gladly trade whatever performance may be lost for the higher level language - in most cases, the performance doesn't make a huge difference anyhow.

Thomas Fjellstrom
BAF said:

Plain old events in C# (language level feature) would be plenty fast enough.

Lets hope so. People thought the same thing about GTK/GDK's event stuff for a long time too. Turns out it really isn't. horribly slow. When Qt got support for the gtk event loop, all of a sudden apps that ran fine before slowed down, and occasionally slow enough that it actually caused redrawing to slow down.

Quote:

in most cases, the performance doesn't make a huge difference anyhow.

In most cases, the lack of performance causes otherwise useful things to just not be done, because it would either be slow, or impossible.

axilmar

Let's also not forget that there is a new generation of not-so-powerful computers in the market that are cheap enough to be massively bought. Doing interesting software on them makes every cycle count.

GullRaDriel

Whatever the computer power is, do what you can and much to save energy.

bamccaig

The blog is...gone!?!? :o

axilmar
bamccaig said:

The blog is...gone!?!? :o

Yes...not much interest in it to justify the effort.

GullRaDriel

Blog is gooooooooooooooooooooooone (on David Guetta's Love is gone ^^)

Vanneto
axilmar said:

Yes...not much interest in it to justify the effort.

So, is the language also cancelled?

axilmar
Vanneto said:

So, is the language also cancelled?

Yes.

Jonatan Hedborg

Did you cancel your project because your new, unfinished, language did not gather enough users? ???

BAF

He cancelled it because he realized he can just use C#. ;D

axilmar

I canceled it because of lack of interest.

Evert

You can tell that after two weeks?
Seriously?

What did you expect? For thousands of people to go "woa, that's fantastic, best thing ever!" and give you feedback ten times a day?

It's the internet. No one cares what you do, and those few that do probably won't tell you that they do.

There is only one reason why you should consider developing your own programming language: because that's what you want to do.

Matthew Leverton

Why does axilmar spell canceled like an American, but BAF spells it like a foreigner?

Evert said:

There is only one reason why you should consider developing your own programming language: because that's what you want to do.

Maybe he meant his own lack of interest?

BAF

Hey, what do you know, the British have one spelling that actually seems correct. 'Canceled' looks wrong to me.

Matthew Leverton

Basic rule learned in first grade spelling class: when the accent is on the first syllable of a two syllable word, you don't double the consonant.

axilmar
Evert said:

You can tell that after two weeks?
Seriously?

What did you expect? For thousands of people to go "woa, that's fantastic, best thing ever!" and give you feedback ten times a day?

It's the internet. No one cares what you do, and those few that do probably won't tell you that they do.

If, in a site full of programmers, the interest is so low, then why should I do it?

Frankly, I expected a little bit more interest.

Quote:

There is only one reason why you should consider developing your own programming language: because that's what you want to do.

There is no point if programmers are not interested in it.

Maybe he meant his own lack of interest?

I am interested in it, but it doesn't really matter if no one else is interested in it. It's not that it is a programming challenge, it's just that if no one is interested in it, then why bother?

Quote:

Why does axilmar spell canceled like an American, but BAF spells it like a foreigner?

Because the Firefox spellchecker suggested it and I couldn't be bothered fixing it.
I always wrote "cancelled", it seems correct that way.

Evert
axilmar said:

If, in a site full of programmers, the interest is so low, then why should I do it?

Frankly, I expected a little bit more interest.

First of all, not everyone here is a programmer. Second of all, not everyone who is a programmer is interested in yet-another obscure programming language - especially one that is not even available yet and for which it remains to be seen whether the person developing it will actually be able to finish it and get a working compiler.
So at best, only a subset of people here would be interested. Of those who are interested, what did you expect? 24/7 interest in your project? Most people have lives and other interests as well. You go, "geez, that's cool" and move on to other things that interest you. You return in a week, maybe two weeks to see how things have been going.

Quote:

There is no point if programmers are not interested in it.

Yes, I'm sure people started asking where the blog and the language went because they didn't really think it was interesting.
Again, what do you expect? If you announce something like this you'll get a flurry of interest, then silence. Interest will start up again when you release a preliminary or early version of your project.

The "lack of interest by other people" sounds like a lazy and cheap excuse to me.

Arvidsson

Smells like monday to me.

bamccaig
Calendar said:

Monday, January 25, 2010.

:-X

Thomas Fjellstrom
Evert said:

The "lack of interest by other people" sounds like a lazy and cheap excuse to me.

Indeed.

If I stopped working on my stuff because other people didn't seem to be interested, I'd never get ANYTHING done. One reason I'm trying to get this silly game of mine done. To prove that I can actually finish something. I KNOW I could do it if I tried, the problem is the trying. Most times, once I realize I can do the thing I'm trying to do, my motivation and energy goes away. This time the challenge is finishing the project to a satisfactory level. Tedious, but hey I won't know if I can do it till I do it ;D

verthex

If I stopped working on my stuff because other people didn't seem to be interested, I'd never get ANYTHING done.

Lately I've been programming routines for quantum optics/field mechanics and not only is it impossible to make sense out of the math involved and the physical theory underlying it, but the complexity of the code involved as well, plus no one cares about my work, although I never even mention to people much. So I don't think making a game or any software should depend on the people you want to cater to.

8-)

axilmar
Evert said:

First of all, not everyone here is a programmer. Second of all, not everyone who is a programmer is interested in yet-another obscure programming language - especially one that is not even available yet and for which it remains to be seen whether the person developing it will actually be able to finish it and get a working compiler.
So at best, only a subset of people here would be interested. Of those who are interested, what did you expect? 24/7 interest in your project? Most people have lives and other interests as well. You go, "geez, that's cool" and move on to other things that interest you. You return in a week, maybe two weeks to see how things have been going.

I did not expect a 24/7 interest in my project. I expected a little more interest than the interest shown so far. I do not think it was that obscure, as I gave plenty of examples both in grammar and features.

I thought that since since almost everyone here is a programmer, the interest in a tool better than what they currently would interest them. Alas, I was mistaken.

Quote:

Again, what do you expect? If you announce something like this you'll get a flurry of interest, then silence. Interest will start up again when you release a preliminary or early version of your project.

Perhaps my interest in languages is more then the average guy then - because if a new and interesting language was designed, I would follow the developments every day and also try to propose my own ideas based on my own needs and experience. But that's just me. It seems other programmers only care about the output of their work and not so much about the tools.

Quote:

The "lack of interest by other people" sounds like a lazy and cheap excuse to me.

Not really. It just that it was a bit of a let down.

To prove that I can actually finish something.

I can do it, what's the point if no one cares? as I said, it's not about the technical challenge. It's also not solving my own problems...I can easily write tones of code in C++, as I have done in the last decade. It's the industry's problem. But this is a lengthy discussion, perhaps for another time.

verthex said:

So I don't think making a game or any software should depend on the people you want to cater to.

Perhaps not if you are doing it for your own pleasure.

Tomoso

Concepts can be interesting, but if we were all planning to program a bit of software with a lanaguage that is still only an idea, we might as well just use peusdo code and use our imagination to compile it.

verthex
axilmar said:

Perhaps not if you are doing it for your own pleasure.

Nope, not having much fun doing it.

Thomas Fjellstrom
axilmar said:

I can do it, what's the point if no one cares?

I realized a while back that even though I knew I could do it, I never actually did. So really, could I? I won't actually know till I do.

bamccaig

^ This. It's easy to say you can do something. You don't really know until you've done it.

Matthew Leverton

Never even bother starting a project unless a) your own self interest will keep you motivated or b) you can make a lot of money with it.

Thomas Fjellstrom

b) you can make a lot of money with it.

Thats one problem I'm having right now. I have my doubts I'll be able to make much off this game, if any. We'll see.

But most of my motivations is to see it through. I have some other project ideas that might have a better chance at making money, but I figure I should start small, this current game is rather simple compared to the other ideas. Sort of a stepping stone.

Also, I learn by doing. If I don't do, I don't learn. So yeah. It'll be good experience for future projects.

Peter Wang
axilmar said:

I thought that since since almost everyone here is a programmer, the interest in a tool better than what they currently would interest them. Alas, I was mistaken.

That's a bit arrogant.

I didn't bother to read this thread until today. Programming languages are a dime a dozen. Programmers know this. What's to set your toy project apart from the crowd?

axilmar said:

What I'd like to create is a C-like programming language but with all the bells and whistles of modern programming languages: garbage collection, a nice static type system, support object oriented programming with interfaces, support for functional programming, templates, Unicode etc, but without the problems that plug C++ or D.

Oh, another imperative programming language. Without an implementation. Next.

verthex

a) your own self interest will keep you motivated or b) you can make a lot of money with it.

I guess you could've just said

"Never even bother starting a project unless you're a capitalist" ;)

Arthur Kalliokoski

I'd add a third catagory

c) You're a glory hound. (Open Source people?)

You might argue that glory hounds have to enjoy building whatever it is in the first place or burn out before it's finished, but the same argument could be made toward making money.

verthex

You might argue that glory hounds have to enjoy building whatever it is in the first place or burn out before it's finished, but the same argument could be made toward making money.

I wonder though, where would the makers of Tetris fall into. I suppose most of you don't know the story behind Tetris, but basically the makers were not allowed to export the game and make profit in their own country because of communism during the USSR. I guess they were glory hounds.

BAF
verthex said:

"Never even bother starting a project unless you're a capitalist"

Or you have enough interest in the project to keep yourself motivated. Can anyone read around here? :o

c) You're a glory hound. (Open Source people?)

Most open source is very selfish in nature, generally the projects are created for personal interest.

verthex said:

I wonder though, where would the makers of Tetris fall into. I suppose most of you don't know the story behind Tetris, but basically the makers were not allowed to export the game and make profit in their own country because of communism during the USSR. I guess they were glory hounds.

Hmm, seems like self interest to me.

Dustin Dettmer

Glory can get you jobs (and hence money).

verthex
BAF said:

Hmm, seems like self interest to me.

Well, that too! Except you may have trouble understanding that in communism, that cannot exist either...

According to the government that is, that's the problem with China, no self interest or privacy allowed there.

Arthur Kalliokoski

Someone who claims to act selflessly or altruistically is lying, to others and quite possibly himself.

bamccaig

^ This.

BAF said:

Most open source is very selfish in nature, generally the projects are created for personal interest.

The work done is usually out of self interest, but usually released to the public with the permission to distribute and modify the work freely.

Compare that to closed source/proprietary vendors...

BAF

That doesn't change the fact that the open source item was created out of self interest, thereby falling into one of the two categories laid out by Matthew.

Arthur Kalliokoski

There's such a thing as stupid short-sighted interest, like a farmer selling his seed corn to buy some corn likker. Funny how that reminds me of Washington politics the last few years.

Matthew Leverton

c) You're a glory hound. (Open Source people?)

That's precisely the category I left out on purpose!

If you are in something for the glory, you are only going to end up utterly disappointed that only your friends (if you have any) and your mom pretended to have any interest in the thing you worked on for the last six months.

verthex

That's precisely the category I left out on purpose!

If you are in something for the glory, you are only going to end up utterly disappointed that only your friends (if you have any) and your mom pretended to have any interest in the thing you worked on for the last six months.

Only if the open source project is small scale, not something like Linux, which by itself is a glory hound for open source computing. Yay!

axilmar

That's a bit arrogant.

Arrogant in what way? that the tools they use can be improved? Do you think that they cannot be improved, and thus me saying so is arrogant?

Quote:

I didn't bother to read this thread until today.

Yeah, I know, that's why I said interest is limited.

Quote:

Programming languages are a dime a dozen. Programmers know this. What's to set your toy project apart from the crowd?

If you bothered to read the introduction, you would have known. Anyway:

1) better orthogonality; for example, no separation classes and primitives.
2) a native language with a context free grammar.
3) functions as first class values.
4) pure functions.
5) solve various C++ problems (headers, forward references etc).
6) reuse of existing tools (compilers and linkers).
7) safety first, performance second. The defaults would be safe, but the programmer could override them in order to increase performance.

Quote:

Oh, another imperative programming language. Without an implementation. Next.

Personally, and I have to emphasize this, I don't think that the future lies with purely functional programming languages. I've studied pure functional programming a lot and my conclusion is that they just don't scale well in complexity from a programmer's perspective. For example, in Haskell, in order to implement a GUI application that handles a tree, one must multiplex the reactive model and the zipper data structure. This is not a task that can easily be handled by the average Joe programmer. There is some benefit to pure functional programming though, so in my language I have pure functions.

Secondly, if you have bothered to read anything, you would have seen that I do not have any mysterious and exotic features in this language. So, the 'no implementation' part isn't very bad.

I have completed the grammar though, for all the futures I planned to include. And this is an important step. It shows I have a complete idea about what I want to implement, and that the project is not a moving target.

...

It's interesting that this thread is alive, and that the latest bunch of comments is not about the programming language itself, but about motivation. It just reinforces my opinion that the interest is low.

Arthur Kalliokoski
axilmar said:

Yeah, I know, that's why I said interest is limited.

Every few months, I tell myself I'm going to learn a new (to me) language. I'll play with Perl or Python for an hour or two, and then put off further progress indefinitely. I was taught COBOL and RPG in school, with BASIC self taught and I can't program in those anymore either. To make my point, a new language would have to have a working "Make Game" button for me to actually use it.

Evert
axilmar said:

Arrogant in what way? that the tools they use can be improved? Do you think that they cannot be improved, and thus me saying so is arrogant?

No, it is arrogant to assume that every programmer here will be intensely interested in your attempt to cure the (perceived) bad points in current C-like programming languages.
Even if everyone agrees on what those are and how they should be solved (and that's a big if), then it still doesn't follow that you're the one to correct them.

Quote:

4) pure functions.

How is that a language feature? You can write those in pretty much any language I can think of.

Quote:

7) safety first, performance second.

Well, there goes my interest.

In my spare time, I use C for hobby projects. Maybe C++, maybe some Perl. I don't quite feel like spending loads of my spare time to learn another language with no obvious support or benefit. Let alone one that doesn't actually exist yet.
For work, I use a combination of Perl and FORTRAN for the bits that have to be fast. Now, I hate FORTRAN (although admittedly FORTRAN 90 ad up isn't that bad) and I'd much prefer to use C instead (actually I'd prefer to use Perl for everything, but let's not go there). Unfortunately all legacy code that I work with is written in FORTRAN (and sometimes obscure old dialects of FORTRAN).
Would I be interested in someone solving all the problems I have with FORTRAN? Yes, probably. That's no small task, however, and until it's done I can't exactly sit around and do nothing. So if someone starts that up I might keep an eye on the project and then in ten years or so, when it's done, mature and stable I might give it a shot. If I'm still interested by that time.

Ok, so you were targeting C and C++ instead of FORTRAN. You're still up against the same type of inertia. You simply cannot expect people to abandon what they have and know for something new that you're designing when it's not even done yet. Especially if there's the risk that it's never going to be done.

Look at it this way: some guy on the internet is going to make a new cool programming language. Do I invest my time and energy into it, or do I sit on the fence and wait? If I invest my time and energy and said guy loses interest and pulls the plug, then I've just wasted my own time. On the other hand, if I wait and see I can step in later and not have wasted my time. So I wait and see.

Tobias Dammers
axilmar said:

1) better orthogonality; for example, no separation classes and primitives.

Personally, I like classes and primitives to be different things. Other than that, the way C# approaches "value types", and has everything implicitly derive from class Object, is pretty close (practically the same for most purposes): There's reference types and value types, and of each kind, there are a few built-in types.

Quote:

2) a native language with a context free grammar.

There's tons of them, and what does "native" mean? That it compiles into platform-specific machine code?

Quote:

3) functions as first class values.

C# has that.

Quote:

4) pure functions.

Every programming language I can think of that has a concept of functions, allows you to create pure functions. Being able to declare functions as pure, and asserting the pureness of a function at compile time might be a nice feature in some situations though.

Quote:

5) solve various C++ problems (headers, forward references etc).

Solved in C#, D, Java, and about every other major language invented after C++.

Quote:

6) reuse of existing tools (compilers and linkers).

You can't really reuse a compiler for a different programming language. The best you might get is a plug-in for an existing compiler (e.g. a gcc module), or a compiler that outputs bytecodes (or "Intermediate Language" code in MS lingo) for further compilation.
There's an excellent toolchain for C#. Using p/invoke and/or COM interop, you can also reuse pretty much every DLL written for the target platform.

Quote:

7) safety first, performance second. The defaults would be safe, but the programmer could override them in order to increase performance.

C# has this. By default, everything is garbage-collected, and you don't mess with pointers, but if you feel you need to, you can. Java also favours safety over performance, but the programmer's option for overriding this are limited.

So, all in all, I don't see too many exciting new features that would make me go "Oh yes, that's the language I've been waiting for".

verthex

Well axilmar, I personally have never used C for anything beyond i/o and even on that level c++ has a library that makes life easier. So as far as redeveloping C, its 2010 guy, and C was 1960 or something like that. Why not work on remaking Java, which has never gone mainstream beyond university made applets that are boring as hell to to use, mainly because any functionality on the scale of a c++ program would cause java to crash most machines today. But even then C++ will dominate on any scale because of efficiency.

Dustin Dettmer

It sounds pretty interesting. I'd like to learn more but I can't afford the time to do so. Some examples that demonstrate better qualities of the language would be nice to see.

You're probably falling victim to the "too-good-to-be-cool" effect. If you had said hey check out this language I just started and provided some crude sytnax, people would be pretty into it. Now that you've reached a higher level of quality people start holding you to the higher standard of C++ etc.

It's like seeing a 3D rendered face that is almost perfect. If you saw pictures like this like I have you would be disturbed to the core. They make you want to puke and slip into a vortex or black hole. It's like running away isn't enough, you need to actually leave this dimension -- probably the creepiest feeling I've ever had.

Vanneto
verthex said:

Why not work on remaking Java, which has never gone mainstream beyond university made applets that are boring as hell to to use, mainly because any functionality on the scale of a c++ program would cause java to crash most machines today.

Oh dear sunny Jesus!

I almost busted a gut laughing so hard! ;D

Java being supported on all modern cellphones? Not mainstream.
Java being the standard for creating business applications? Not mainstream.
Java being used by NASA? Not scalable.

Thanks, you made my day. ;D

verthex
Vanneto said:

Java being supported on all modern cellphones? Not mainstream.
Java being the standard for creating business applications? Not mainstream.
Java being used by NASA [www.sun.com]? Not scalable.

Java being supported on all modern cellphones? Not most, or at least not majority
Java being the standard for creating business applications? Yeah and oracle sucks because of it, I've made those.

Java being used by NASA [www.sun.com]? Nothing for spaceflight or anything in air, they still use C because Java crashes. Trust me I've talked to someone once who works with NASA, he said its a risk factor.

Vanneto

The fact is, Java has gone mainstream. Its the most popular language on the planet. [1]

verthex
Quote:

Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

So I wonder what their definition of mainstream is?

Vanneto

I'm done talking with you. I still cant believe you are arguing Java is not mainstream. It just baffles the mind!

verthex
Vanneto said:

I'm done talking with you. I still cant believe you are arguing Java is not mainstream. It just baffles the mind!

Its mainstream, with all the notions of crap! Anything written with Java has shit coming off of it!

BAF

I may not like Java, but I wouldn't go so far as to say it crashes a lot. It shouldn't crash unless the code is screwed up.

verthex
BAF said:

I may not like Java, but I wouldn't go so far as to say it crashes a lot. It shouldn't crash unless the code is screwed up.

Its not that Java crashes but a system with low memory and a 5 year old CPU tends to freeze up and may crash in case someone does not expect Java to load while using 50% load already. I'm not happy going to a site and out of nowhere Java starts running and I have several other things going on and then the whole system is unresponsive for like 5 minutes, sometimes longer.

bamccaig

NoScript prevents scripts, plugins, and applets from being executed until you explicitly say to unblock them each. It's a pain in today's Web because most of the major sites you visit link to 20 different third parties and you don't know which scripts are required to make the Web site you're actually using work, but it's still super nice being in control of when those scripts are enabled (if ever; I'll often just leave). It's also alarming just how many third party servers you're contacting on a regular basis without NoScript.

BAF

Except in the case of NASA, it would be a dedicated system only meant for running the single program that was written. All your concerns are moved to design time when doing embedded development.

[edit]
Damnit, bam bam, stop posting at the same time I do. :P

verthex
bamccaig said:

NoScript prevents scripts, plugins, and applets from being executed until you explicitly say to unblock them each.

Sometimes if you right click on an ad you can chose to forbid or allow it because it will be on the top of the lost, or it will be the only one not forbidden.

BAF said:

Except in the case of NASA, it would be a dedicated system only meant for running the single program that was written. All your concerns are moved to design time when doing embedded development.

What I heard was that NASA uses C for anything flight related because programmers tend to make more mistakes with Java.

m c

Java is basically the new COBOL. Everything done in the modern world has probably been touched by both C and Java directly or indirectly, can't really say that about any other HIGH level language, not even C++.

These custom business apps are java most of the time. And the operating system that it runs on is mostly C, probably. Well, microsoft was pushing C# for this since it first came out, and in the context that I am speaking of here, the invention of C# is a recent development (and in the past lots of lower-tier stuff would have been access/vb), and now I do see many job advertisemenst of .NET developers that a few years ago would have been all java, but there would still be a huge body out there, still expanding.

So it went mainstream in the major business software industry long ago (that is the work for a living custom software development), not the pre-packaged consumer industry. Plus a lot of these places didn't run some microsoft box as a server, but probably had some Sun hardware or something. Most insituitions seem to be set up that way.

Note: Those jobs are not ones that I'd like, but I can't deny that they have been big for a long time.

verthex
m c said:

major business software industry

Which is Oracles crappy interface using Java for its web based database. I've made a couple and even with 20 fields to enter your name, number, etc, the computer runs terrible. Maybe if Oracle would make their own web browser optimized for Java then I could see something "streamlined".

m c

Verthex, java in a web browser is an insignificantly tiny fraction of all java out there. That isn't what I was alluding too, but EVEN THEN:

Many custom "web apps" are written in java, that is a java in-browser interface (or web-start or w/e). Things like government online paperless things to try to get away from the cumbersome past of having to get a thousand weird forms and do this and that. Now you can do it all online, pay tax, apply for passport, get welfare support for education blah blah blah. The government hire contractors to make this stuff (probably someone big like IBM). It's all written in Java.

And perhaps that would be USA, France, Australia, Germany, etc etc. Also for applying for jobs, and what about their internal systems?

Most people using java don't know it, because it's all server side. Low-tier online shops use PHP, everything higher uses Java. Although, hopefully with something better than tomcat.

Anyway, I'm not a java fan. I've had too much of it already in university. I'm C all the way, I've even been doing custom ASM for things like from osdev. But these are the things that I know.

verthex
m c said:

Many custom "web apps" are written in java, that is a java in-browser interface (or web-start or w/e). Things like government online paperless things to try to get away from the cumbersome past of having to get a thousand weird forms and do this and that. Now you can do it all online, pay tax, apply for passport, get welfare support for education blah blah blah. The government hire contractors to make this stuff (probably someone big like IBM). It's all written in Java.

But COBOL was that to begin with and Fujitsu tried to remake it recently into a more OOP language. Whatever happened with that?

m c

I don't know. I'm not omnipresent business czar, sorry I can't be of more help to your curiosity, though I'd imagine it would be aimed at people who are maintaining COBOL systems and havent yet re-implemented it all in Java (which many did, and long time ago already).

And from what I know, these are the kind of places where team leader is some pumpous "smarty-pants" 25 yo from india who is put as your team leader for reasons that you don't want to know, and you get like 30k a year if you're lucky, and if you end up there in real life and you're not just doing it as an alternative to unemployment, then you've done something wrong. Aka code monkey, Hahaha.

[EDIT] Wow we are off topic. I'll attempt to fix that:

I've got my own programming language, it is called "K" because that is the more Kickarse equivelant of the letter "C". Anyway it's just a custom pre-processor for C because I got sick of trying to do impossibly complex things with the normal C pre-processor and makefile.

I wasn't going to use variadic macros because msvc doesn't support them (which was a major handicap), and I wanted to do things like #define each function signature so there is only one place to change it (in the header file that the source file also includes), if only it wans't so ugly.

And it was thigns like in the header files:

#define MY_FUNC_SIG blah blah
FUNC_DEC(INDIRECT(MY_FUNC_SIG), BLAH BLAH)

and in the source:

FUNC_DEF(INDIRECT(MY_FUNC_SIG), blah blah)

Andi t would appropriately declspec or attribute accordingly on a common subset of things like pure or noalias and fastcall or cdecl and dll import or visibility default / hidden ETC ETC.

And in the makefiles I'd do things like

.PHONY : $(APPS)
$(APPS)    : $(wildcard $@/src/*.c) $(wildcard $@/src/*.h) $(wildcard $@/include/*.h)
  @echo && echo && echo "********************************************************************************"
  @echo "Compiling " $@ && echo "********************************************************************************"
  @echo "using CFLAGS= " $(FWCommon_CFLAGS) $(FWApps_CFLAGS) && echo
  $(CC) $(FWCommon_CFLAGS) $(FWApps_CFLAGS) -E -o bin/$@ $(wildcard $@/src/*.c) `cat $@/cmdline.inc 2>/dev/null`
  strip bin/$@

Where APPS was an array of my projects, with inter-project dependencies done like:

APPS= mylib myapp myapp2 myspeciallib
myapp: mylib
myapp2: mylib myspeciallib

And they had to be in appropriately named subdirs, and if they had special linker args that wouldb e put in a cmdline.inc file in their speical subdir, so on and so forth.

Problems was that DJGPP uses an old gcc that doesn't do whole-program at once optimization, and mingw doesn't have a /dev/null unless maybe I run it in that msys thing, and blah blah, so I also made my preprocessor a custom make / project manager tool.

But I still code in C, it's just more convenient now...

Jonatan Hedborg
verthex said:

What I heard was that NASA uses C for anything flight related because programmers tend to make more mistakes with Java.

[citation needed, seriously]

Java is a lot safer than C. We're talking orders of magnitude here.

verthex

[citation needed, seriously]

Theres no citation, it was a conversation I had once. But heres one pdf I found

Quote:

Java is a lot safer than C. We're talking orders of magnitude here.

He said it was mostly related to memory issues and overloaded programs crashing due to faults in program design.

axilmar
Evert said:

No, it is arrogant to assume that every programmer here will be intensely interested in your attempt to cure the (perceived) bad points in current C-like programming languages.

Where did I say that I assumed every programmer here will be intensely interested in my attempt? I never said that.

Quote:

Even if everyone agrees on what those are and how they should be solved (and that's a big if), then it still doesn't follow that you're the one to correct them.

Why not? please give me some reasons.

Quote:

How is that a language feature? You can write those in pretty much any language I can think of.

Perhaps you are confusing constness with pureness. They are different. I don't know an imperative native language that can enforce pureness on a function or class level. For example, in C++, a function with all const parameters can remove constness from one of its parameters with const_cast.

Quote:

Ok, so you were targeting C and C++ instead of FORTRAN. You're still up against the same type of inertia. You simply cannot expect people to abandon what they have and know for something new that you're designing when it's not even done yet. Especially if there's the risk that it's never going to be done.

Look at it this way: some guy on the internet is going to make a new cool programming language. Do I invest my time and energy into it, or do I sit on the fence and wait? If I invest my time and energy and said guy loses interest and pulls the plug, then I've just wasted my own time. On the other hand, if I wait and see I can step in later and not have wasted my time. So I wait and see.

I did not ask you to abandon what you have or use, nor to invest time and energy into it. I just asked about a little interest, i.e. read the stuff I've written to and tell me what you think. It's not that I have written millions of pages about it! one could easily spend 5 minutes going through it.

Personally, I like classes and primitives to be different things.

Why? interesting opinion, please give me a reason.

Quote:

There's tons of them, and what does "native" mean? That it compiles into platform-specific machine code?

There C, C++, D and ADA. Native means without a virtual machine.

Quote:

C# has that.

C# is not a native language.

Quote:

Solved in C#, D, Java, and about every other major language invented after C++.

C# and Java are not native.

D is a mess.

Quote:

You can't really reuse a compiler for a different programming language.

Of course you can. Many languages have that option...for example, Haskell can be compiled to C. C is used in many places as an intermediate representation.

Quote:

C# has this. By default, everything is garbage-collected, and you don't mess with pointers, but if you feel you need to, you can. Java also favours safety over performance, but the programmer's option for overriding this are limited.

So, all in all, I don't see too many exciting new features that would make me go "Oh yes, that's the language I've been waiting for".

But they are not native languages.

Vanneto

Whats with all the big walls of posts? You took the cowards way out because nobody took interest in a language that doesn't exist, what else is there to say?

axilmar

Coward's way? I wouldn't have replied if that was the case. At least I replied ;-).

If there is interest in such a language (basically, a successor to C++) I will pursue the project. If not, then life has a lot of other interesting things to do.

bamccaig

Of course there's interest in a "modern day C++". :) You just have to give us something to work with before we can really say how we like it. The blog really wasn't a very good way to document the language (it would be a better place to chronicle the development). The actual language should be documented in an RFC or specification document. Something with proper code formatting and a logical structure.

You won't be able to satisfy everyone either. We all have our little preferences, etc. The best you can do is design it the way you think it would work best and see how it does. If it doesn't work then you can always try again.

Vanneto

I was interested, but not too much, but thats just because its not here yet. I did follow your blog though, every once in a while, had it in my bookmarks.

Finish the damn thing! Do it! ;)

axilmar

Ok, I'll see what I can do and let you know. Thanks for the tips.

Kibiz0r
verthex said:

But heres one pdf I found

Whoa, they have a standard for C? Crazy, that's just like every other company that has ever programmed in C! They must not use any other languages!

Thread #602942. Printed from Allegro.cc