Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
SO community, just have a quick question to ask. I've been doing a bit of research on learning languages that have concurrency in mind. For the moment, I've been working with Scala and I've been loving it. I've decided to also learn some others, so as not to specialize in a particular language and instead learn as many as I can. So far, I've taken a keen liking to the EVM, specifically Elixir.
So, my question is this: how beneficial would it be for me to learn Erlang before learning Elixir? I'm very interested in the syntax and such of Elixir, but being built on Erlang, I'm not sure if it would hurt to jump straight into it.
I don't think learning Erlang would be directly useful for learning Elixir; learning what an atom looks like in Erlang isn't going to affect how you learn about atoms in Elixir, for example.
However, there's a lot more to Erlang than just Erlang the language. The obvious one is OTP, which Elixir can make use of. Now, there's no inherent reason that you can't learn OTP within the confines of Elixir, but Erlang's had years to accumulate documentation, tutorials, books, etc on the whole Erlang ecosystem, which is available to Elixir. If you want to learn details of OTP, you might pick up the book Erlang and OTP in Action, but all the code there is Erlang. If you know both Erlang and Elixir, it'd be a lot easier to apply what you've learned from the book to Elixir.
Or think of third-party tools written in Erlang. These are useable by Elixir, but the documentation is very likely going to assume you're using Erlang, so again, knowing Erlang will help you apply what you learn to Elixir.
EDIT by rvirding:
I think you are wrong in your 1st paragraph as everything you would learn in Erlang is directly applicable to Elixir. All the data types are exactly the same and behave in exactly the same way which is what you would expect as they are what the underlying BEAM provides. So an Elixir atom and an Erlang atom are the same and are used in exactly the same way even if the syntax is (slightly) different. You have the same basic control structures and ways of organising code, in functions and modules, as again they are what the underlying BEAM provides. So while Elixir provides some extra high-level constructs underneath they are the same.
This what a bit too big for a comment, hence it ended up here.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I want to learn how to use Arduino, but it needs some code and there are 2 different options are c and c++. I am confusing that which one to learn "c or c++" at first (I mean for beginner)? are those both same? Actually, it's really really my first time to learn code for Arduino. also, can you tell me where can I learn from? Thank you :)
You mentioned two key words, Beginner and Arduino.
Decision on learning C++ first versus learning C first might
be a matter of opinion for the key word Beginner since many
who start with one can easily adopt for the other.
learning C++ first however has some advantages versus learning C first
for the key word Arduino which I explain.
Arduino programing is mainly targeted toward bare-metal programming, which includes dealing with many environmental options/variables which are usually known at the compiling time.
Programming methodologies which exists in C++ that address processing known factors at compiling time outnumber those of which exist in C by a large number!
Although I must add that these features rarely appear in user programming interface, if any! But still these features would be available for one to implement individually regardless of using Arduino or other bare-metal programming toolkits.
Further more multiplicity of the environmental options/variables demands a well established hierarchical ordering and management which is also more addressed in C++.
You can always try the Arduino website itself as an easy source either for learning or for tutorials/examples!
But to learn the language correctly and completely always keep an eye on authentic sources like cppreference.com and/or cplusplus.com.
Finally you can always ask/lookup your questions and seek guidance here!
Good luck!
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have read on some blogs that Go is a better system programming language and is going to replace C/C++. I am currently learning C++. So, I was wondering whether I should continue learning C++ or move to Go?
Go is designed for reliable, fast online services. It's the recommended language of Google App Engine. It does have general feature parity with C, plus additional scalability features. Perhaps, one day, it will be adopted for embedded programming and client-side applications, but that has yet to happen.
C is used in many, many application domains. No other language approaches its breadth of use. As a first language, though, it won't help you develop good habits.
C++ is a multi-paradigm language. It supports deep, generic metaprogramming. Many users of C++ are really using "embedded domain-specific languages" (EDSLs) where a library provides functionality defined within the C++ grammar. Go does not attempt to provide this depth, which is a Pandora's box of complexity.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I want know which is best whether compiler design using either tools like Flex & Bison or C/C++.
Because I've heard that developing with tools is not worthy at all. I'm a beginner to compiler design so I need clarification about this. And other thing that I want to ask you is which of those two ways as I said above expected by a company in compiler design. Please help me!!!
This depends on complexity of your syntax you want to parse. It is not hard to implement simple grammar by hand but without experience it is hard for complex grammars.
If you don't have any experience with lexers and parsers, it would be better to start with other tools not using LR (LALR) parser but LL because they are much more intuitive for starters.
I have very good experience with ANTLR. It generates Java code but it has also C++ backend and nice grammar development tools (ANTLRWorks).
So my advice is none of those two you have chosen but start with ANTLR.
If you are not constrained by C/C++, I would recommend Eclipse Xtext. It is simple to learn, has great documentation, and has the added benefit of automatically generating an Eclipse-based IDE that supports your language, with syntax-highlighting, content assist, and other powerful features.
Xtext has its own programming language (Xtend) which is a more powerful version of Java (in a way, it is similar to Scala). Xtext uses ANTLR internally.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Dear software engineers:
I am currently teaching a procedural programming unit (using the C language) to a group of Level 3 students in the UK. Here is the Unit 16 Procedural Programming specification document.
For a Distinction (higher level) task, the students must "evaluate the suitability of procedural programs for graphical applications".
It is possible to implement graphical applications using GTK and Qt, but it's also possible to create blinking text on a webpage (just because you can, it doesn't mean you should).
Many games and desktop applications are written in C++, so I suspect that object-oriented code is better for building graphical applications.
To reiterate, I need to "evaluate the suitability of procedural programs for graphical applications".
As a software engineer, how would you answer this question?
[Edit] For what it's worth, I received an excellent response to this question on Quora.
I don't think that object-oriented or procedural programs are "better", any more than writing algorithms in recursive or iterative style are "better".
Lots of wonderful code was written before object-orientation came along.
I think the styles have more to do with managing complexity. Objects are state and behavior together in a single software component. When you system maps well to objects, that style can be a good way to manage complexity. It's worked well for GUI components like windows, buttons, etc.
But it need not be the only way.
I took an intro programming class in C at Stanford University in 1996, when C++ was just starting to take hold and neither Java nor C# existed. They had students doing graphical programming using a very disciplined style that used well designed libraries and rigorous decomposition. I would defy you to find better code.
Even with object oriented programming, normally functions will eventually get called to perform some operations, and the code in those functions would be considered procedural. The main difference is how the code ended up calling those functions along with the parameters used by those functions.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I'd really like to know what knowledge do I have to pursue in order to create scripting languages from the ground up, probably using C++, maybe python, for those are the languages I know.
I've searched through SO similar questions, but nothing comes close of what I'm asking. I intend to understand language processing, not natural language, but scripts that doesn't have the focus on human readability, only on functionality.
My first idea, without any technical background, was to create a scripting language that assimilates a bunch of logical statements and making use of advanced built-in algorithms like logical reasoning, pattern recognition, neural networks an statistical analysis, in order to provide lots of useful(or not) information.
Sorry my bad english, I learned online, as almost everything I cited here :D and that kinda explains my lack of theorical background.
Thanks in advance.
"From the ground up" is a quite relative term, especially if you consider Python as the implementation language. I think what you are looking for is the implementation of a domain specific language (DSL). Good starting points might be this book or this one. DSLs are a wide topic, so if you provide more details, we might be able to give better tips.