Jump to content

Which language is ocarina of time written in?

zindan
On 11/11/2019 at 8:19 AM, Epimetheus said:

How can you code proficiently in c but not c++? Dude, all of the overly complicated things c++ has it has carried on from c

- Templates and polymophism

- Inheritance

- Operator overloading

- Smart Pointers

- STL containers and Algorithms

 

All of these are among the most complicated features to understand in C++, and IIRC they don't exist in C.

The hardest thing about C is the memory management, which is also a problem in C++, but as the new C++ updates are released this tends not to less of a problem.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, tankyx said:

- Templates and polymophism

- Inheritance

- Operator overloading

- Smart Pointers

- STL containers and Algorithms

 

All of these are among the most complicated features to understand in C++, and IIRC they don't exist in C.

The hardest thing about C is the memory management, which is also a problem in C++, but as the new C++ updates are released this tends not to less of a problem.

Dude, what's the point of continuing a thread where I already admitted i knew it on a superficial level. At my school they didn't teach us classes, objects and the such in c++, we're doing them in java. Gotta streamline if they want to teach us 8 languages in 3 years i guess. 

I'm including html and css though, not really programming languages but still languages

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Epimetheus said:

Dude, what's the point of continuing a thread where I already admitted i knew it on a superficial level. At my school they didn't teach us classes, objects and the such in c++, we're doing them in java. Gotta streamline if they want to teach us 8 languages in 3 years i guess. 

I'm including html and css though, not really programming languages but still languages

i know it has nothing to do with the topic, but as I see that ... If I can give you a word of advice, focus yourself on C then C++, it will give you all the good habits to be a good coder. Then it will be a lot easier to learn other languages. If you follow their way of teaching code, you are going to have a bad level coming out of those classes.

Link to comment
Share on other sites

Link to post
Share on other sites

If it's about programming, just focus on learning C. If you can do that, you can basically get the gist of every (well, most) other language in a short time. On the other hand, if you start with something like Java, it will be harder to switch languages, because Java makes things easy for you, so you start to take some things for granted.

 

I don't know why anybody would voluntarily use C++, unless they just love pain. There's plenty of good reasons to use C. Generally speaking, though, these days there are lots of nice options for languages. It's just that for learning I recommend C.

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, Bramimond said:

<snip>

I don't know why anybody would voluntarily use C++, unless they just love pain.

<snip>

And reasons to use c++, mostly the bits about the bottom-up approach.

Link to comment
Share on other sites

Link to post
Share on other sites

16 hours ago, tankyx said:

i know it has nothing to do with the topic, but as I see that ... If I can give you a word of advice, focus yourself on C then C++, it will give you all the good habits to be a good coder. Then it will be a lot easier to learn other languages. If you follow their way of teaching code, you are going to have a bad level coming out of those classes.

To be clear, we're also doing c now, we did c++ a year ago. In my opinion though it's simpler for beginners to pick up c++ than c, since there are strings, the input may be confusing for noobs who have no idea of what they're doing compared to a simple cin, the likings. Also file management is pretty similar between the two. We basically started with c++ to learn the basics, then this year we're doing both java and c, in different classes. In java we're doing classes and objects, while in c we're doing processes and soon threads

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Epimetheus said:

To be clear, we're also doing c now, we did c++ a year ago. In my opinion though it's simpler for beginners to pick up c++ than c, since there are strings, the input may be confusing for noobs who have no idea of what they're doing compared to a simple cin, the likings. Also file management is pretty similar between the two. We basically started with c++ to learn the basics, then this year we're doing both java and c, in different classes. In java we're doing classes and objects, while in c we're doing processes and soon threads

That is a dumb way to teach code. You should start by using C to learn modern code and to learn code discipline. Then when you are at ease with C, you start C++ to get into OOP. Then now that you know how to do stuff the hard way, you can learn higher level languages and use those efficiently, something you could not have done without C/C++ basics.

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, tankyx said:

That is a dumb way to teach code. You should start by using C to learn modern code and to learn code discipline. Then when you are at ease with C, you start C++ to get into OOP. Then now that you know how to do stuff the hard way, you can learn higher level languages and use those efficiently, something you could not have done without C/C++ basics.

Honestly I found C++ to be not really the greatest tool to  teach about classes and OOP. A lot of it has to do with the amount of work you need to set it up in the first place. The language that helped me get classes down pat was C# because I didn't need to do this silliness of declaring my class in a header file and defining it in another file. You just define it in C# (and by extension Java since they're both similar) and the rest magically happens. Actually the fact that C# doesn't have header files in the first place is nice.

 

I find the more cruft you have to go through to get what you want, the harder it is to use as a teaching tool.

Link to comment
Share on other sites

Link to post
Share on other sites

54 minutes ago, Mira Yurizaki said:

Honestly I found C++ to be not really the greatest tool to  teach about classes and OOP. A lot of it has to do with the amount of work you need to set it up in the first place. The language that helped me get classes down pat was C# because I didn't need to do this silliness of declaring my class in a header file and defining it in another file. You just define it in C# (and by extension Java since they're both similar) and the rest magically happens. Actually the fact that C# doesn't have header files in the first place is nice.

 

I find the more cruft you have to go through to get what you want, the harder it is to use as a teaching tool.

The thing is that going proggressively in difficulty concerning programming is that you are going to take bad habits, that will be hard to change when you start to learn a lower level language.

And that is not mentioning how C++ is dependant on good memory management, something that is extremely assisted in C#. Syntax can be a bit of hassle to learn when doing C++, I admit that though.

 

It is same as driving really. You start by driving a Honda Civic Manual gearbox, modern car but lacking lots of feature to assist you, then you get that E46 M3, lot more powerful, more features but still pretty unassisted, then you get that last gen M3, with all the assists and features you need to make your life a lot easier.

 

If you started directly by the last gen M3, you would have crashed it because the assist would have compensated your lack of driving skill up to the point you are asking too much to the car.

Link to comment
Share on other sites

Link to post
Share on other sites

22 minutes ago, tankyx said:

The thing is that going proggressively in difficulty concerning programming is that you are going to take bad habits, that will be hard to change when you start to learn a lower level language.

And that is not mentioning how C++ is dependant on good memory management, something that is extremely assisted in C#. Syntax can be a bit of hassle to learn when doing C++, I admit that though.

The only habits that I found to be "cross compatible" if you will, is purely the basics that are compatible across every language like sound design. But on the topic of learning programming concepts, I would argue the language is irrelevant because it's an implementation detail and anything that makes learning the concept harder or tedious should be lower on the totem pole.

 

Something like implementing memory management is baggage depending on the language you've chosen. Whatever memory management implementation skills you learned C and C++ don't really apply to other languages like Java, C#, and Python. There are designs that you can consider that will affect memory usage, but those aren't language dependent.

 

Quote

It is same as driving really. You start by driving a Honda Civic Manual gearbox, modern car but lacking lots of feature to assist you, then you get that E46 M3, lot more powerful, more features but still pretty unassisted, then you get that last gen M3, with all the assists and features you need to make your life a lot easier.

 

If you started directly by the last gen M3, you would have crashed it because the assist would have compensated your lack of driving skill up to the point you are asking too much to the car.

It depends on what those assist features are. Anything that helps assisting you in situations that are rarely encountered are a godsend over situations that happen regularly. Take for instance anti-lock brakes. That's an amazing assist feature because the only way to get proficient at not locking your brakes is to constantly practice hard stops in various conditions and learn how your brakes respond to it. And situations where you would be doing hard stops come up rarely and often times the situation comes up suddenly (i.e., the person is panicking, so good luck having them try to remember what to do)

 

However, something like blindspot monitoring I'd argue isn't as useful and is potentially detrimental, because blindspot checking I'd argue is a basic skill and is something you do on a regular basis in more relaxed conditions.

 

Speaking of which with regards to learning how to drive, there's really only the following fundamental skills people should learn:

  • Accelerating
  • Braking
  • Turning
  • Being aware of one's surroundings
  • Conveying your actions as best you can before doing it

Everything else pertinent to moving the vehicle and not crashing it is built up upon these skills. But something like learning to drive a manual over an automatic isn't. It's an implementation detail and it only makes the first two skills harder to learn because there's more stuff to do on top of it.

Link to comment
Share on other sites

Link to post
Share on other sites

Quote

Whatever memory management implementation skills you learned C and C++ don't really apply to other languages like Java, C#, and Python.

This is a wrong statement. Knowing what happens under the hood will definitely change the way you code, the objects and algorithms you are going to use. C and C++ force you to look under the hood, where Java and C# hides it from you by adding levels of abstraction. It does not mean you can't look under the hood in those language, it means that it does not encourage you to do so.

Quote

Take for instance anti-lock brakes.


Good example, because 99.9% of the drivers are not only braking the worst way possible, they are also using ABS the most inefficient way. This is because you are not taught to brake without it. You could gain couples of yards braking correctly without triggering ABS than triggering it.

ABS is there to help you deal with changing grip level (especially on damp tarmac).

TC and ESP are the same, people actually don't understand their car they can spin it even with those assists on.

 

Quote

Speaking of which with regards to learning how to drive, there's really only the following fundamental skills people should learn:

  • Accelerating without TC/ESP
  • Braking without ABS
  • Turning and load shifting
  • Being aware of one's surroundings
  • Conveying your actions as best you can before doing it

 

Link to comment
Share on other sites

Link to post
Share on other sites

50 minutes ago, tankyx said:

This is a wrong statement. Knowing what happens under the hood will definitely change the way you code, the objects and algorithms you are going to use. C and C++ force you to look under the hood, where Java and C# hides it from you by adding levels of abstraction. It does not mean you can't look under the hood in those language, it means that it does not encourage you to do so.

Memory management as an implementation detail means needing to know how to use things like malloc and free. Memory management as a design choice like using an O(log n) memory usage algorithm over an O(n) is not dependent on the language and knowing what goes under the hood will not help in understanding which algorithm to use.

 

Heck I doubt most people don't even know what really goes on with malloc and free beyond the function call.

50 minutes ago, tankyx said:

Good example, because 99.9% of the drivers are not only braking the worst way possible, they are also using ABS the most inefficient way. This is because you are not taught to brake without it. You could gain couples of yards braking correctly without triggering ABS than triggering it.

ABS is there to help you deal with changing grip level (especially on damp tarmac).

TC and ESP are the same, people actually don't understand their car they can spin it even with those assists on.

The point of these particular assists is to not make up for poor skill levels. It's to help people who do not often encounter adverse conditions that would trigger those assists. However, some people don't get that and rely on the machine to do it.

Link to comment
Share on other sites

Link to post
Share on other sites

15 hours ago, tankyx said:

This is a wrong statement. Knowing what happens under the hood will definitely change the way you code, the objects and algorithms you are going to use. C and C++ force you to look under the hood, where Java and C# hides it from you by adding levels of abstraction. It does not mean you can't look under the hood in those language, it means that it does not encourage you to do so.

I have found this to be very false in my own experiences.

Generally, in the context of programming, "under the hood" just means "after you remove the closest abstraction layer". Doing so doesn't change the way you code because you know more about the underlying system, doing so changes the way you code because you learn more things when you go down an abstraction layer. Just as evidence, think about the last time you did that: Did it only affect the language in which you removed a layer of abstraction, or did it change the way you did things in every language?

Additionally, C/C++ definitely does not force you to look under the hood, it is under the hood, at least as far as anyone who doesn't care to hand write binaries is going to get. The languages are direct representations of modern computers:

  • Stack is equivalent to the stack. Most useful processors have the notion of putting items on the stack in their ISAs.
  • The heap is precisely equivalent to RAM. Some storage that we can put things on and take them off seemingly at random, given that we have an address to them.
  • Pointers are exactly indirect addressing.
  • Functions are identical to subroutines.

C++ skews that view slightly with objects. But objects in C++ are really just arrays of addresses to other arrays, which is a type of addressing that is sometimes called multi-level memory indirect addressing when it's implemented in hardware. In C terms, a pointer to a pointer. (vTables for function call resolution are a good example of this.)

The first language that I ever looked under the hood on was C#. In fact, it's very common for people to look under the hood on C#. There are well-known free disassemblers for inspecting CIL, reflection is a fairly common design pattern (which practically requires knowledge of the underlying workings of the language), and tons of people talk about how the CLR (in Java terms, the JVM) work all the time. These are fairly common questions in my experience and, besides their difficulty level, I haven't seen one thing that should have discouraged someone from learning about them.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

  • 4 weeks later...
On 11/10/2019 at 4:12 AM, zindan said:

Oh well darnit. I don't think I will be able to learn C fairly easy. I am currently learning java. I don't know how much C differs from Java.

Well, Java is Object Oriented and C is procedure-oriented.

 

Java requires a interpreter "vm" (jvm) while C requires a compiler to run

 

With C you can f*ck up everything...

With java... Welp, Java tells you where you are f*cking things up so that you don't do the same next time 

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, querneu said:

Well, Java is Object Oriented and C is procedure-oriented.

 

Java requires a interpreter "vm" (jvm) while C requires a compiler to run

 

With C you can f*ck up everything...

With java... Welp, Java tells you where you are f*cking things up so that you don't do the same next time 

C can be object oriented as well if you know how to abuse the function pointers ???

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

16 hours ago, wasab said:

C can be object oriented as well if you know how to abuse the function pointers ???

Still not OO

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, tankyx said:

Still not OO

In order for something to be considered "objected-oriented", it's generally agreed that it must have three capabilities/attributes: encapsulation, inheritance, and polymorphism.

 

You can do all three in C : https://www.state-machine.com/doc/AN_OOP_in_C.pdf

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Mira Yurizaki said:

In order for something to be considered "objected-oriented", it's generally agreed that it must have three capabilities/attributes: encapsulation, inheritance, and polymorphism.

 

You can do all three in C : https://www.state-machine.com/doc/AN_OOP_in_C.pdf

Well you can do this in a hackish, incomplete way, but as C does not facilitate the usage of OO, you cant say C is a OOP language. You can bend C in order to get some OO stuff done, but that's all.

Also no concept of class (as you can't define private/protected members)

Link to comment
Share on other sites

Link to post
Share on other sites

22 minutes ago, tankyx said:

Also no concept of class (as you can't define private/protected members)

Encapsulation is the basic ingredient of a class, which you can do in C in a non-hacky way. "Public" and "private" members were built into the language by design, just not using the keywords you'd expect.

 

Also I don't believe protected members is a requirement for encapsulation.

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, tankyx said:

Still not OO

Totally is. Arguing it isnt is like arguing C char array is not a string.

 

All these things can be implemented by a C programmer. If you want to make objects and classes in C, you can do so in C. 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, tankyx said:

Well you can do this in a hackish, incomplete way, but as C does not facilitate the usage of OO, you cant say C is a OOP language. 

This is like saying you can't program functionally in java simply because java is an object oriented language. 

 

1 hour ago, tankyx said:

Also no concept of class (as you can't define private/protected members)

You can code in the concept of class in C just like you can code in data structures like C++ vectors or Java arraylist if it doesnt have it by default so it matters little.

 

Langauges with OOP support like python has no private or protected members either. 

 

 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×