Just another thought (designing a fast but powerful language)

Started by
76 comments, last by Aardvajk 10 years, 1 month ago

I wanted to ask this in a previous thread but I thought it needed it's topic.
Would it be possible to make a compiled language as fast as c and c++, multi paradigm like c++, less complex than them both and can be used like in really complex situations like in making an OS/game engine/IDE etc.
Just wondering (may have mistakes above).

Thanks.

That's a really broad mission statement. Do you have experience making OSs, game engines, or IDEs? If not, how do you hope to design a language for it? What are the problems with existing languages in these domains? Are they the same accross those domains?

I just want to say that designing a good language involves a lot of decisions that aren't even being remotely considered here.

Reducing LOC count is a ridiculous metric for the strength (or quality) of a language. You guys are all arguing about standard library contents and not even anything pertaining to actual language design.

I predict that any attempt at producing a language in this thread will end in tears.

QFT. A lot of the discussion has been about the size of the standard library, which is not something a new language is not going to have any way.

@apochPiQ: that's why i started the thread. You could just talk about some things that are more important.
Thanks smile.png

I can recommend two objectives you should add to your language design:

1) Facilitate features as a library. Boost show the benefits of having features that can be the implemented without a new language. But broadly, the ability to do this in existing languages is limited.

2) High level abstractions that you can peal away. This is the aim of the STL and other libaries. You describe the function, not the implemenation, but the implementation is in the same language, so it can be fine tuned/swapped out when needed.


I need to think more.

There is an old saying I've been told for years that I think applies nicely to that: "Think less, code more."

I disagree with this. Design is an important, especially with a giant project like a compiler. Code is important, to be able to test out features, but Nathan2222 is no where near ready to write any code.

You still don't even know what problem(s) you are trying to solve. Unless and until you can name a concrete area in which your language will be different, you're just scrabbling around in the dark. And unless you can argue convincingly that that language difference is an advantage, nobody will ever care.

I started building a new programming language eight years ago. It still is far from finished and lacks even the most basic tools like a debugger. Granted, I don't spend huge chunks of time on it except for rare occasions, but that should give you some idea of what you're up against. Oh, and I started with a very clear list of things I wanted to solve and why my approaches were advantageous.

QFT.

I too have a compiler project on the back burner, and believe me it's no small task.

You need to be able to answer the question succinctly: Why should I use your language? You haven't done that in this thread.

Advertisement



ultramailman, on 18 Feb 2014 - 4:32 PM, said:

Are you planning to write a compiler for this language you have in mind?

Yeah. An ide.
Won't i have to?

You won't have to. But it might be good to try writing a compiler for a simple and existing language first. After that, you should have more insight.

Chances are, a language will have enough basic features from an existing language, that you could just start on those. It's not that hard to chanrge syntax as you write a compiler -- the hardest challenge with doing that is updating tests. So you can start writing the language with what syntax you think it'll have, implementing those simple features you know your language will have in one fom or another. And it allows you to play with your language as early as possible.

ultramailman, on 18 Feb 2014 - 4:32 PM, said:
Are you planning to write a compiler for this language you have in mind?
Yeah. An ide.
Won't i have to?


You won't have to. But it might be good to try writing a compiler for a simple and existing language first. After that, you should have more insight.
Chances are, a language will have enough basic features from an existing language, that you could just start on those. It's not that hard to chanrge syntax as you write a compiler -- the hardest challenge with doing that is updating tests. So you can start writing the language with what syntax you think it'll have, implementing those simple features you know your language will have in one fom or another. And it allows you to play with your language as early as possible
the purpose of designing the language will be to enable anyone willing to spend a few hours learning a few things be able to create whatever they want.

I've been searching google throughout for things like AI programming languages (by AI, i don't mean languages used to program AI), smart languages, intelligent languages which led me to text vs visual programming (i really didn't know if there was a thing like visual programming till today) and then i started noticing the c vs c++ vs python vs other languages and started searching for things like has programming changed in 10 years. Some of these things may not be directly related but i did see several of my ideas spread over all of them.

No, i haven't made an OS, game engine, ide etc. but i want to do that before even trying to do make this language. My old signature showed that.
After making the language, i'll probably redo the projects in my language as a test.
I haven't programmed in two days probably because i think a lot and new ideas pop out and i leave my learning but i like coding.

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32

--
GREAT QUOTES:
I can do ALL things through Christ - Jesus Christ
--
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
--
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy

In my thoughts, i've created a google chrome style browser with less than 300 lines of code.

In my thoughts I'm like a magical flying unicorn dude.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

After making the language,

you will be probably at age of 90 then (you doing many assumptions about your superpowers)

the purpose of designing the language will be to enable anyone willing to spend a few hours learning a few things be able to create whatever they want.

So you're making easy to learn as an objective. That's concrete, but then why is your language better than other languages with a similar goal, like python and Go? It also goes against some of your other objectives.

I've been searching google throughout for things like AI programming languages (by AI, i don't mean languages used to program AI), smart languages, intelligent languages which led me to text vs visual programming (i really didn't know if there was a thing like visual programming till today) and then i started noticing the c vs c++ vs python vs other languages and started searching for things like has programming changed in 10 years. Some of these things may not be directly related but i did see several of my ideas spread over all of them.

There is indeed quite a body of knowledge out there about language design. But you need to design to what you know, so IMO you should have a concrete niche for your language before really getting into research.

No, i haven't made an OS, game engine, ide etc. but i want to do that before even trying to do make this language. My old signature showed that.
After making the language, i'll probably redo the projects in my language as a test.
I haven't programmed in two days probably because i think a lot and new ideas pop out and i leave my learning but i like coding.

Making an OS, a game engine, or an IDE are big projects on their own. So is making a compiler for your language. Working on your own, part time, I wouldn't aspire to do more than one of them. You can dream, but planning things that far down the road is futile.

But my point was that you can't design a good language for these task if you don't know what the challenges in them are.
I disagree with this. Design is an important, especially with a giant project like a compiler. Code is important, to be able to test out features, but Nathan2222 is no where near ready to write any code.

I know design is important, but Nathan2222 is so lost in the theory of making a language and compiler that he is going to spend more time designing it, finding problems with it, redesign it, find more problems, etc and never get to the coding. Even Bjarne Stroustrup, in I believe it was his C++ Programming Language Special Edition, said it is better to get a foundation down quickly and then slowly add features and build on it rather than being stuck in an infinite design loop. I believe I've seen the same concept applied to video game programming too. That is why I stick to code more and think less, because I, myself, have stopped production on some projects or games because I would start finding things I didn't like and want to redesign them and then get lost in the design process.

I disagree with this. Design is an important, especially with a giant project like a compiler. Code is important, to be able to test out features, but Nathan2222 is no where near ready to write any code.

I know design is important, but Nathan2222 is so lost in the theory of making a language and compiler that he is going to spend more time designing it, finding problems with it, redesign it, find more problems, etc and never get to the coding. Even Bjarne Stroustrup, in I believe it was his C++ Programming Language Special Edition, said it is better to get a foundation down quickly and then slowly add features and build on it rather than being stuck in an infinite design loop. I believe I've seen the same concept applied to video game programming too. That is why I stick to code more and think less, because I, myself, have stopped production on some projects or games because I would start finding things I didn't like and want to redesign them and then get lost in the design process.

That may be a sound aproach, but Nathan2222 currently hasn't been able name the design goals of his language. That needs to come first. He can start learning compiler design and the tools and libraries that are available for that, but coding novel language features is woefully premature.

In my thoughts, i've created a google chrome style browser with less than 300 lines of code.

In my thoughts I'm like a magical flying unicorn dude.

In my thoughts I've convinced Salma Hayek to be my personal pleasure slave for life


After making the language,


you will be probably at age of 90 then (you doing many assumptions about your superpowers)
this isn't something i'll do on my own

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32

--
GREAT QUOTES:
I can do ALL things through Christ - Jesus Christ
--
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
--
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy

This topic is closed to new replies.

Advertisement