• entries
359
237
• views
189653

371 views

Happened across a nice (new) article by Bruce Eckel that I think very aptly describes C++ (and Java) in today's world. Always refreshing to see someone who is published explain something more clearly and concisely than I could.

I also happened across the Fan programming language a few weeks ago, but a reference to it in Eckel's blog reminded me to re-post here. It fits into that same sort of 'something like Java/C# but with first class functions and less rigid type structure' family of languages that Scala headlines and I'd like Tangent to be.

Speaking of which, the big bug problems of late last week have allowed for a flurry of smaller bugfixes and positive test results today. Most important of these at the moment is the ability for generators to be infix operators. Since there's no for statement, there needs to be a range generator to cause the same behavior. At the moment, I'm likely to use to as that operator with something like up to to be the exclusive version. ie

foreach( int x in 1 to 5 ){    print x;                   // 12345}foreach( int x in 1 up to 5 ){    print x;                   // 1234}

Much more Tangentlike than range(1,6); or even 1..6

Also tested were some of the simple generic method syntax. I unfortunately will probably need to break the syntax that is there (away from C# syntax) in order to do specialization in a non-psychotic manner. Though probably not soon. I've yet to actually make generic parameters visible in methods, making them kinda useless.

## 1 Comment

I really like that idea and especially the syntax. I havnt used much C# so I havnt gotten a chance to use the foreach loop, though its pretty much a no brainer. I like your additional keywords though, it takes the symbols (and thus the complexity and time to translate the symbols in your head) out so you can spend more time figuring out the logic code in your program instead of wondering if your loop will be off by one.

BTW I sent you a PM!

## Create an account

Register a new account

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.