Homebrew Question What would be the ideal coding language to make homebrew apps when the Switch gets hacked?

ChaosRipple

Well-Known Member
Member
Joined
Oct 1, 2015
Messages
272
Trophies
0
Age
29
XP
183
Country
United States
Basically Assembly, C, C++ as they all compile into machine code directly.

What are the advantages of using C over C# or C++? none?
Any languages not listed above such as C# or Java will need their runtime environment set up on the system - the .Net Framework and the Java Runtime Environment respectively. They have the advantage of making coding a lot easier and quicker because a lot of common functionality is already done for you. Hence, a lot of programmers out there would argue that C#, Java or any other similar languages aren't good because of the stuff that is automated for you (garbage collection for example), which ultimately blinds you from knowing how the computer works more in-depth.
 
Last edited by ChaosRipple,
  • Like
Reactions: Alkéryn

evandixon

PMD Researcher
Developer
Joined
May 29, 2009
Messages
1,725
Trophies
0
Website
projectpokemon.org
XP
2,313
Country
United States
Hence, a lot of programmers out there would argue that C#, Java or any other similar languages aren't good because of the stuff that is automated for you (garbage collection for example), which ultimately blinds you from knowing how the computer works more in-depth.
I'd say that's a poor argument for two reasons:
- It extends to C, because that blinds the programmer from understanding the underlying machine code. A human could write much better ASM/machine code than the compiler, right? [/sarcasm]
- While it's good to know how it works under the hood, worrying about these things takes time and effort which could instead be spent on other features. In many cases (many but not all) the automated stuff is better than what a human could do. It's still possible to create a memort leak using .Net, but in C/C++ it's far far easier and much more common.
 

grossaffe

Well-Known Member
Member
Joined
May 5, 2013
Messages
3,007
Trophies
0
XP
2,799
Country
United States
I'd say that's a poor argument for two reasons:
- It extends to C, because that blinds the programmer from understanding the underlying machine code. A human could write much better ASM/machine code than the compiler, right? [/sarcasm]
- While it's good to know how it works under the hood, worrying about these things takes time and effort which could instead be spent on other features. In many cases (many but not all) the automated stuff is better than what a human could do. It's still possible to create a memort leak using .Net, but in C/C++ it's far far easier and much more common.
You compile down to the assembly code and look at it if need be in C, and you can write inline assembly if it's a critical section of code. Also, garbage collection is not a thing in C. You allocate and deallocate memory yourself rather than some garbage collector coming in and doing it whenever the hell it pleases.
 

evandixon

PMD Researcher
Developer
Joined
May 29, 2009
Messages
1,725
Trophies
0
Website
projectpokemon.org
XP
2,313
Country
United States
You compile down to the assembly code and look at it if need be in C, and you can write inline assembly if it's a critical section of code. Also, garbage collection is not a thing in C. You allocate and deallocate memory yourself rather than some garbage collector coming in and doing it whenever the hell it pleases.
I say why spend the time doing all that yourself when experts have made it unnecessary. (.Net allows unmanaged memory operations too, although that's usually asking for trouble, because when one has more control over memory, one has more responsibility over memory, and often times people overlook minor details that turn into huge errors.). Why deal with pointers when reference variables are far easier while being just as powerful. Not to mention the myriad of other features. (My favorite is reflection.)

The only reasons I see why one would legitimately prefer C/C++ over a higher level language:
- Embedded systems where there aren't enough resources for a higher level language
- Advanced graphics engines where speed is of the essence
- Operating systems and APIs which the higher level languages run on

Python.

:^)
I'm not a fan of Python TBH. Reasons:
- Whitespace
- Lack of type safety
- Classes and properties feel like an afterthought
- Whitespace (I feel extra strong about this so I included it twice)
 
Last edited by evandixon,
  • Like
Reactions: jsa

sarkwalvein

There's hope for a Xenosaga port.
Member
Joined
Jun 29, 2007
Messages
8,505
Trophies
2
Age
41
Location
Niedersachsen
XP
11,199
Country
Germany
Actually Python is a great language because of whitespace.
If I could decide what to use in a project, I would go with C++ for serious code and Python for beautiful code.
I would never use Java because it should die a painful death. (several reasons)
And regarding memory leaks, Java IS a memory leak. I remember having a whole project done in C++/Qt by me, it used around 10MB of RAM, and the same thing ported to Java by someone else... 960MB of RAM... and it slowed down whenever it felt like, yey garbage collection! /s
C# is actually nice, I could use that, but is not my preferred.
That said, normally I don't get to choose what to use in a project.
 

ChaosRipple

Well-Known Member
Member
Joined
Oct 1, 2015
Messages
272
Trophies
0
Age
29
XP
183
Country
United States
I'd say that's a poor argument for two reasons:
- It extends to C, because that blinds the programmer from understanding the underlying machine code. A human could write much better ASM/machine code than the compiler, right? [/sarcasm]
- While it's good to know how it works under the hood, worrying about these things takes time and effort which could instead be spent on other features. In many cases (many but not all) the automated stuff is better than what a human could do. It's still possible to create a memort leak using .Net, but in C/C++ it's far far easier and much more common.

I was so close to saying, "not trying to start an argument," since there are a lot of programmers out there who are really sensitive to this topic. Thank god nobody went ham on your reply. To straighten things up, I stated, "a lot of programmers out there" make that argument, not me as I prefer not to give my opinion on this subject, mainly to avoid arguments. And I've already mentioned that these languages make programming easier. ;)
 

RemixDeluxe

Well-Known Member
Member
Joined
Nov 23, 2010
Messages
4,583
Trophies
0
XP
2,525
Country
United States
Is it really a bad idea to learn C++ and then C in that order? I've read about how it can throw you off badly and its not advised.
 

Alkéryn

Moon Dweller ~
Member
Joined
Mar 15, 2015
Messages
1,665
Trophies
1
Age
25
Location
Albategnius, Moon
XP
2,392
Country
France
Is it really a bad idea to learn C++ and then C in that order? I've read about how it can throw you off badly and its not advised.
Learning C first also have its disavantage as people will then try to use C style programming on C++
i think the best is still to learn C first but to understand that C and C++ are NOT the same language when you learn C++
 
  • Like
Reactions: RemixDeluxe

Bedel

The key of the blade
Member
Joined
Oct 28, 2015
Messages
1,384
Trophies
0
XP
2,815
Country
United States
Well... Some people here may gonna kill me, but java is possible and may not be a bad idea at all.
Most novice programers use this language, so it could lead to more (simple) homebrew! Also, in some ways it's faster to program on it than it's con C, C++ and C#.
Yes, you'll have less RAM to use for the homebrew, but some utilities (like a e-shop music changer and this kind of stuff) don't really need it.
 

Alkéryn

Moon Dweller ~
Member
Joined
Mar 15, 2015
Messages
1,665
Trophies
1
Age
25
Location
Albategnius, Moon
XP
2,392
Country
France
Well... Some people here may gonna kill me, but java is possible and may not be a bad idea at all.
Most novice programers use this language, so it could lead to more (simple) homebrew! Also, in some ways it's faster to program on it than it's con C, C++ and C#.
Yes, you'll have less RAM to use for the homebrew, but some utilities (like a e-shop music changer and this kind of stuff) don't really need it.
Really bad idea since the switch don't have a built in java interpreter
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Veho @ Veho:
    I only wish it was actually playable.
  • Veho @ Veho:
    There's a guy on the Tube of You that makes playable mechanical arcade games out of Lego. This could work on the same principle.
  • Veho @ Veho:
    Just a couple of guys taking their manatee out for some fresh air, why you have to molest them?
  • Veho @ Veho:
    Stupid Chinese shop switched their shipping company and this one is slooooooow.
  • LeoTCK @ LeoTCK:
    STOP BUYING CHINESE CRAP THEN
  • LeoTCK @ LeoTCK:
    SUPPORT LOCAL PRODUCTS, MAKE REVOLUTION
  • LeoTCK @ LeoTCK:
    THEY KEEP REMOVING LOCAL SHIt AND REPLACING WItH INFERIOR CHINESE CRAP
  • LeoTCK @ LeoTCK:
    THATS WHY MY PARTNER CANT GET A GOOTWEAR HIS SIZE ANYMORE
  • LeoTCK @ LeoTCK:
    HE HAS BIG FOOT AND BIG DUCK
  • LeoTCK @ LeoTCK:
    d*ck i mean*
  • LeoTCK @ LeoTCK:
    lol
  • Veho @ Veho:
    Mkay.
  • Veho @ Veho:
    I just ordered another package from China just to spite you.
  • SylverReZ @ SylverReZ:
    Communism lol
  • SylverReZ @ SylverReZ:
    OUR products
  • The Real Jdbye @ The Real Jdbye:
    @LeoTCK actually good quality products are dying out because they can't compete with dropshipped chinese crap
    +2
  • BakerMan @ BakerMan:
    @LeoTCK is your partner the sascrotch or smth?
  • Xdqwerty @ Xdqwerty:
    Good morning
  • Xdqwerty @ Xdqwerty:
    Out of nowhere I got several scars on my forearm and part of my arm and it really itches.
  • AdRoz78 @ AdRoz78:
    Hey, I bought a modchip today and it says "New 2040plus" in the top left corner. Is this a legit chip or was I scammed?
  • Veho @ Veho:
    @AdRoz78 start a thread and post a photo of the chip.
    +2
    Veho @ Veho: @AdRoz78 start a thread and post a photo of the chip. +2