Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Weak typed, but definitely make the effort to learn a strong typed language after.
-
it doesn't matter, even in weak typed you still need to know what type you are working with
if you make a mistake on strong typed it wont work
if you make a mistake on any other it also wont work :) -
bosi5093yIt's a question we discussed recently because our trainees learn php as one of the first languages which I would classify as a weakly typed language (please no php hate here. I'm working in an e commerce environment and php is the goto lang there).
A few weeks ago our trainees start to learn golang which is strongly typed (after 1 year of experience with php) and it was really hard for them to get everything right and understand the differences between all types (e.g. int32 and int64). I think that it is definitely worth to learn a strongly typed language. -
C0D4681383yAs someone who started with weakly typed and moved into strongly typed, it's a pain in the ass to transition over.
Going the other way would have trained you into being specific and make the transition easier.
But at the end of the day, do you. Not everyone e has to learn several languages in their career, but that does t mean you shouldn't. -
@bosi I will try not to express my deep hate for php as I am forced into a situation similar to yours. Said so, I’d go with strongly typed as well:
- it’s easier to manage
- compiler will give you more practical hints
- forces you to learn generics
- interfaces and enums allow for awesome solutions -
Strongly typed languages: "Here is a compiler error. You have fucked up at this specific place. Here is a suggested fix."
Weakly typed languages: "I‘m not doing what you wanted because you fucked up somewhere. I won‘t fail because of this, but your program will just not work correctly. Also, have fun figuring out what you did wrong and where the problem is."
I think the choice should be obvious. -
Crost41083y@Lensflare I used to work with a guy that said weak types force you to read the code you're using instead of blindly using it. It's an opinion I don't understand.
-
If you are the law and order type of person:
Go for statically and strongly typed. Java might be axactly what you want.
If you are a mathematician:
You want a strongly and statically typed language with a full-featured type system.
So go for Haskell (lazy evaluation) or OCaml / F# (immediate evaluation).
If you want to be as close to the CPU as possible:
Go for one of the non-managed languages, where you have to allocate and deallocate memory yourself. Also learn at least some assembly language first, so you actually know what you are doing.
If you just want to get shit done:
Go for Python (dynamically typed with ease of use as primary design goal).
If Python is too slow, google Cython and use it to write extensions to be used by your Python code.
If you are new on a job right now and they expect you to improve existing code:
Learn the language, the existing code is written in. -
Strongly typed. The advantage of a weakly typed language is that you don't have to write out the types or express your complex transformations with generics, but when you're learning, thinking about what your function does to the set of all things that could be passed to it is great practice. A programmer worth their salt would do it instinctively anyway, but a strict type system is the only way to teach a newbie this fundamental technique.
-
Also, any language that isn't 1-error detecting is a bad teaching language. When you're learning a logical system so complex as this, you shouldn't be hunting typos that caused semantic issues; they should always be syntactic errors.
-
Weakly typed. Because then you'll have to build your own type system when you try to write a nontrivial program, which will be a good learning experience.
-
thamara373y@bosi Yeah! I have been thinking a lot about this, as I'm starting to mentor fresh minds on programming. And, although I used to say that learning an untyped, or weak typed language first is the best, I have been questioning this.
Specially if the person has something specific on mind, that would require strongly typed languages.
Maybe it's worth the initial rustle of learning more "complex" languages and data types, then having to re-learn that afterwards. -
thamara373y@Oktokolo HAHAHAHA
That's a great suggestion! I've been researching this to help people who are starting. When I first had to introduce a type to one specific person, this took a look more work than I anticipated. Because of this I'm re-thinking my approach.
Your suggestions focused on the area are really great. I specially liked the "If you just want to get shit done" hahahaha
And I didn't know Cython. Definitively will take a look! -
@lbfalvy that is not the advantage of weakly typed languages. All mainstream strongly types languages have automatic type inference now, which solves the problem.
And this is more related to strict/static typing than to strong typing.
When it comes to types, anything that has weak/dynamic/unstrict typing is always a disadvantage.
Those languages may have other advantages, but they are not type related. -
@thamara
Hey, just to be clear about it: "...just want to get shit done" actually means "for the quickest prototyping experience and best glue and scripting language".
Especially data scientists and admins can profit from it a lot - as for them it can replace the horrible R and shell-scripting languages.
As you get better at Python, you definitely should do full type annotations after the prototyping stage. Your IDE (most likely the good and gratis PyCharm Community Edition) will then show you some bugs you missed (but not as much of them, as the compilers of statically and strongly typed languages would).
When writing software, there actually is no way around knowing your types. If you can't reason about them in your code, debugging will prove to be impossible for you in any language. -
strongly typed, cause if they start with something like python they don't know how to read parse errors (been there)
-
marymireles10153dI think the most important thing is to consider the goals and needs of the programmer. If they're looking to learn a language for a specific task or industry, such as data science or web development, then a weakly typed language like Python may be sufficient. However, if they're looking to learn a language that will help them develop robust and maintainable code, then a strongly typed language like Java or C# may be a better choice. Additionally, if you're looking for help with writing a capstone project, I recommend checking out this post https://linkedin.com/pulse/... with useful resources. Ultimately, it's up to the individual to decide what their goals are and what type of language will best help them achieve them.
Related Rants
The first programming language to learn should be:
A: Strongly typed
B: Weak typed
C: Untyped
question
programming
learning