![]() This means the Java compiler will catch many errors that dynamically typed languages won't (until runtime) and there's no dealing with segmentation faults (which isn't to say you can't leak memory in Java obviously you can). ![]() Java is statically typed and has garbage collection. Many people like to hate Java and it's true that the language is extremely verbose and lacking in some of the more modern language features (eg closures) but none of that really matters. You could implement a version for a nominal base class but it's a little less useful. This is important because data structures like hash tables rely on there being a common base class. C++ is hideously complicated even in simple usage and has a ridiculous amount of "gotchas". As I said in the comment, I think this is a terrible choice. That's not a bad thing but simply worth noting. It's good if you want to learn really low-level details like how the memory is managed but memory management is suddenly an important consideration, as in, correct usage of malloc()/free(). This can be good but it can also be confusing for the beginner and it can be harder (initially) to catch errors since they typically won't be apparent until runtime. There's nothing stopping you implementing your own versions as a learning exercise but you may find that you're building high-level data structures on top of other high-level data structures, which isn't necessarily useful.Īlso, Ruby and Python are dynamically-typed languages. However, these languages all have abstractions for the common data structures. High-level languages like Python and Ruby are often suggested because they are high level and the syntax is quite readable. The answer to this question depends on exactly what you want to learn.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |