Jump to content

Photo

C++ is complicated; so how do I make my own programming language?


  • Please log in to reply
19 replies to this topic

#16 Logos

Logos

    Gnome Child

  • Members
  • Real Name:Kevin
  • Location:USA, North Carolina

Posted 13 October 2015 - 02:59 PM

Creating a programming language before mastering (or at least having a good understanding of) programming seems like trying to learn how to run before you can walk. Although it may not be pleasant, you could either stick it out with C++ or try an easier programming language.


Edited by Logos, 13 October 2015 - 02:59 PM.


#17 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 13 October 2015 - 04:12 PM

To make a programming language you'll need to not only understand how programming on the level you're making it on works, but also lower levels.


  • SyrianBallaS likes this

#18 SyrianBallaS

SyrianBallaS

    Defender

  • Members
  • Real Name:Samer
  • Location:Detroit, Michigan

Posted 13 October 2015 - 10:24 PM

ASM and Machine/Binary language are pretty tough and I'm learning a little bit of both in my Computer Architecture class.

Making a new language is not worth the effort. If you don't care about cross-platform, use C#. The .NET framework is like the best thing ever, only if it was cross-platform. 

 

In games at least, languages like C++ provide support code which doesn't really have anything to do with the game itself, just the ability to run it.

Support as in: draw graphics, load AI, memory, etc.



#19 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 14 October 2015 - 02:22 AM

ASM and Machine/Binary language are pretty tough and I'm learning a little bit of both in my Computer Architecture class.

Making a new language is not worth the effort. If you don't care about cross-platform, use C#. The .NET framework is like the best thing ever, only if it was cross-platform. 

 

In games at least, languages like C++ provide support code which doesn't really have anything to do with the game itself, just the ability to run it.

Support as in: draw graphics, load AI, memory, etc.

 

C# is cross-platform now. At least, it's on Linux now, but I'd need to check if there is an OSX port.

 

I agree, that learning assembly in order to make your own language is certainly going the long route. Some people hav e done it though... That's where we obtained this vast library of available languages. I used to have to write in 6809 ASM, and 6800.65xx ASM, plus some M68K and PPC stuff. I'm well and done with all of that, but I have a mate who prefers assembly. I used to, but I'm just sick of re-memorising new things.

 

I can read ZASM though. So, gold star for me... Right?

 

Back to the topic at hand, I don;t think the OP will like Java much more than C++. They are very similar in structure, and syntax. I honestly think that Pascal is the way to go for him, because it uses almost the exact syntax that he used in his demonstration...albeit not with curly braces. It compiles on almost anything too.

 

Java is IMO a heap of rubbish, because you need a JVM to run it. it's not compiled, but interpreted, adding a much larger footprint, with far more memory leaks, and chances of errors. Aye, it's portable, but so is anything else, if you compile a binary for it. What makes Java so popular, is that you don;t need to cross-compile bins for multiple OSes and architectures. Oh, and don't get me started on endian issues: PowerPC assembly, remember?

 

I honestly prefer classic C to C++, because it;s not scattered into so many segments. it's more linear, and I'm used to that, coming from the older paradigm. You will still need to use it's syntax though, like main() to start a programme. I can also mention that Cobol (my specialty, for years) was more like what the OP described, in terms of declarations, but it required so many init routines, that it would scare the britches off of the lot of you. C++ is a huge pain without an IDE.

 

If the OP wants to learn C, he would do well to get a C IDE, and a C++ IDE> Microsoft VCPP is a good tool, although, it's Microsoft, so expect the unorthodox. Some syntax/keyword highlighting issues are going to be there, because Microsoft uses them in some weird way, that no-one else uses.

 

I suggest this, because I know the Op uses Windows, only. if he was on Linux, I'd have other suggestions. In fact, I'd suggest installing Linux to learn programming, as it'll give you ready access to a boatload of useful tools, and he can learn shell scripts while you're at it, which is generally useful.

 

Insofar as other scripting languages, I think I'm a bit in love with Angelscript, but that's subjective. Lua is also a popular choice, but I;m not too keen on it thus far. Anglescript allows either C++ or C syntax though.



#20 vaualbus

vaualbus

    Junior

  • Members
  • Real Name:Alberto
  • Location:Turin, Italy

Posted 15 October 2015 - 12:41 PM

ASM and Machine/Binary language are pretty tough and I'm learning a little bit of both in my Computer Architecture class.

Making a new language is not worth the effort. If you don't care about cross-platform, use C#. The .NET framework is like the best thing ever, only if it was cross-platform. 

 

In games at least, languages like C++ provide support code which doesn't really have anything to do with the game itself, just the ability to run it.

Support as in: draw graphics, load AI, memory, etc.

C# is portable, take a look at .NET Core. The entire C# compiler, runtime is open source!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users