C# is a superfluous language because it came after Java. If C# were first, then Java would be superfluous. Fewer languages in the world = better. We realistically need half a dozen languages for 99% of the world’s programming.
As the creator of C++ once said: "There are only two kinds of programming languages: the ones people complain about and the ones nobody uses." **Bjarne Stroustrup with sunglasses and the next episode by Dr. Dre playing in the background**
In the c++ example the leftmost const is actually the one that makes the value const, and the second const makes the pointer constant. Const is applied to the thing to it's left unless there is nothing to it's left, in which case it applies to the right.
@@rokker333 This is what C/C++ is like. This is why everyone is racing to replace both those languages. C - Zig, Odin, Onyx. C++ - Rust, Carbon (and maybe Lobster).
I strangely relate to that feeling of Java having a place in your heart. I can easily list all the reasons I don’t like Java and yet sometimes I feel homesick for it. Makes no sense.
There are many languages I'd rather write code in, but Java really isn't as bad as people say it is. Java 1.5 and lower was absolutely awful, but things started getting better in Java 7 and especially 8. Now it actually feels like a modern language.
After spending a lot of time in the TS world, you start to realise how nice it is to have explicit interfaces at run time, nominal sealed classes, and real enums with properties and method and whatever. The only issue is that the Java world is the opposite of the JS world, instead of hype driven development there’s still companies on Java 8 who don’t trust recent LTS versions still. Oh and that exception situation is weird. Kotlin’s a nice sweet spot.
I love Lua... and because of that I have to agree it is C tier... But that's fine, it never aspired to be something better. All it wants to do is to hold hands and be hugged. It's like a child, it can run little errands, do occasional odd jobs and play around. You wouldn't ask a child "WHY YOU DO THAT?" in anger right? It's a child, be nice...
I know you really love it and try to get so deep in it the way you explained it, I've never seen any code written in Lua but I like how you described it 👏👏
@@m96fa40 It's 22 keywords in total, none of those are unique. Learning it takes an afternoon. It's a glue language supposed for tacking stuff together, made to interact with C. This gives it the power to be easily integrated with almost everything. It is basically the home assistant of programming languages, can do tons of stuff but has its caveats. e.g. like C it does as told, regardless of if it's a smart move to do that.
Correction at 19:05 : It is the other way around. You have to read it from right to left. Here is a breakdown: const int* const foo(const int* const& ptr) const 1. const int* const Means that the method returns a const pointer to an int that is const 2. const int* const& ptr Means that the method takes a reference to a const pointer which points to an int that is const as an argument 3. const Means that the method cannot change member variables (unless they are marked as mutable or you cast away the const using const_cast)
Personally I find the east const convention more intuitive: int const *const foo(int const *const &ptr) const; Now const always acts to the left. int const is constant int, int const * is pointer to constant int, int const * const is constant pointer to constant int, etc. Downside is it's unfamiliar (and code like the above is extremely uncommon), so I don't use it at work to avoid confusing my people.
@@barongerhardt yeah mutable is terrible except in lambdas, and people use it for the worst reasons. "Oh I have a getter which caches for performance, so I'll make the cache mutable so the getter can still be const even though the cache means it's no longer const in any sense wee lying is fun" Getouttahere
Yep I noticed the same! Not writing in C++ every day though, but these things I know. But what I do not know, is the situation in TypeScript. Is it opposite there? Because that may of course be a large source of confusion then. Many C family languages have a preceding type notation style, also including Java, C# and Go, but some are more into the trailing form. I know that like Rust, TS does it's in types trailing notation. So I can really imagine a difference with the const keyword as well.
@@jongeduard Constness is different in JS/TS land. In JS/TS `const` is used to define a const reference to an object. It's the reference that cannot change, not the object that it points to. Whereas using `let` allows you to later change the reference. In both cases, you are free to change the properties of the object being referenced. In TS there's `readonly` which you could apply to properties. This is what statically checks and prevents you from modifying said property. There's also `as const` which is used to cast all properties of an object as readonly. I believe it's also used to define literal types. In JS, there's also Object.freeze() which prevents modification of an object's properties. All in all, a different language. Don't forget that JS is an embedded language and can't do anything practical on its own. Its core and implementation resides in C++ (V8 in Chromium based browsers for ex.) TS is just a static analyzer on top.
@@thatryanp I had similar experience. I was taught pointers, oops and other concepts in c++ on a blue screen, dos like terminal called turbo c++. If you want somebody to hate programming, start there.
I started with C++ more than a year ago and i gotta say it's hard as fuck no like if you say Java or sum shit are hard as fuck, then C++ is harder than fuck but what can i say it's insanely powerful I've written some graphics and malware with it and i gotta say they were good and fast
yea, but then PHP is below JS, which is just hilarious. As for 2024 Javascript as a programming language is worse than PHP in nearly every conceivable way.
@@SkywalkerWroc Then I could agree with you with that because PHP has built-in types now? Types are necessary for any software project, and TS makes JS so much better.
The idea that PHP's only use case is web development is way wrong. I have a very large neural network for machine learning running in PHP with no web interface to it... people that hate on PHP have either never used PHP or haven't used it since version 4... this is just a fact.
@@JamesSmith-cm7sg python is PAINFULLY slow. But yeah, anything you want to do has already been done and published in library or module, so it can be great for prototyping or proof of concept stuff. I would never use it in production though.
@@JamesSmith-cm7sgbecause i can build a prototype for almost anything that will read like english and then compile that to an exe in C or rebuild it with a working model to reference in something like go. And thats if its actually slow, most of the time its more than fast enough and when it isnt, its because your using the built in features wrong, or not using the right ones for the right jobs
I've got the top 1 or 2 languages I think everyone can agree on. 1: The one you're most adept at. 2: The second one you're most adept at. You can fill in the rest.
@@vaisakh_km Java 23 is insanely good. We're writing some amazing stuff and all compiled to native code running bindingly fast! Check out 1 Billion Row Challenge. Only language that was faster was C (and not by much). Reading and processing 1 billion rows in 1.5 seconds!
@@Muskar2 yep I know what you mean - take the addition of generics and alternate for loop syntax for example. Need to keep it simple. Just from the point of view of a large scale deployment- mmm is the one single thing we would have chosen if we had a voice in it. That would have been the difference between optimising existing bottlenecks vs going for rewrite in a different tool in a lot of cases
@@steveoc64 I don't like GC either. But I think mmm is best suited for languages that specialize in it. Like Odin-lang, where allocators are first class.
@@tuananhdo1870 It’s simple, cheap and effective if you know your job. it’s not language that’s bad but a developer. i say that other languages are just decorated php with all that fancy “features” which just makes them much more complex but making literally zero changes
I don't know if anyone here reads the comments, but Python is the best language for getting out your ideas. If I have an idea for a program, or a basic app I can do all of it in Python test it maybe even stick with just that if it's good enough. Then once I have everything down, and looking right I can go ahead and recode everything into a language that may be better for what I am trying to accomplish like C.
LUA is incredibly useful if you ever need to embed a scripting language into an application. And there are a lot more reasons to do this than the average lay person might suspect.
I believe that since all of Valve's games, support modding and Lua is the main scripting language used for them. So I can assume that you can integrate Lua modding in your game easier than with other languages.
C++ standard library is super ugly for two main reasons: it must only create identifiers defined by the standard or with the reserved double underscore or underscore Capital patterns; and it often wants to share behavior without hitting the C++ issue where each base class must have a separate address by using recursive template definitions and other metaprogramming techniques. They don't actually write the code with the underscores, btw, it's run through an uglifier script.
Pin on a pointer type is a promise that you can depend on what's in a pointer staying valid as long as the pointer is valid. Unpin on a pointee means that it doesn't need that promise, and that you can move it out anyway. Pin is needed for generic/library code to be able to trust that it can keep interior pointers around, in particular for async code to keep references to other stack variables around at an await point. You can commonly provide it either by pinning an existing value to the stack with pin!, or moving it to the heap with Box::pin(), both of which prevent you from moving the value out. Unpin means a type doesn't need to be pinned, or equivalently, that you can safely remove the pin. It can be used either to assert than a type doesn't require pinning, or to allow generic code to let callers have a nicer API if they know it doesn't matter for some type, as methods can be conditionally available on a generic parameter implementing a trait. A confusing detail is that pinned pointers are themselves a good way to get an Unpin from a value that isn't already Unpin: this is because if it's already pinned, you don't need to work about adding any more pinning.
There are some "things you can do in JS" that TS by default won't let you do even though it is actually safe. But thats more that ALL JS runtimes have certain standard library things behave one way but the spec is more strict. And TS has those all typed to the spec.
We need to just stop using Javascript for anything other than front-end scripting. Y'know, the thing it was designed for. It's easy to say JS is a trash language when you use it in a domain it isn't meant to be used. It's like trying to use Java on something that isn't a blueray player, or Python on a computer. When you use a language not how it is designed to be used, it'll seem like trash.
@@anon8510 C is a scripting language to avoid writing assembly, so obv all software should be written in it, as there are no bounds to what you can do with it. Btw, do YOU know what scripting is?
@@anon8510 warning: text wall and hot take scripting is the act of writting short, quick and dirty programs "scripts" or parts of programs, which can be either to alter the behaviour of a preexisting system without recompiling most of it, or for accomplishing tasks as they come up C shines most in that kind of environment where you don't necessarily want a fancy language complaining about out-of-bounds array accesses or reading uninitialized memory when you either know why you're doing it or don't care about the possible consequences and with how simple the language is, you want even notice recompiling most script-scope shared objects / mini-programs try writing a simple single-use command-line program with zero attention given to either security, performance, error tolerance, generalisability, maintainability or readability and you'll find C is the easiest answer in most cases, though sometimes beat by Perl or Python want to embed a scripting language in an app you're making? you could add a dependency on an interpreter and do complex maneuvers to respect your guest language's assumptions, or you could just dlopen(3) a shared object, probably written in C, that couldn't care less what you do with its memory (not mentioning that if you provide a C API, adapters for many other mainstream languages are trivial to implement (if it isn't automated)) "but manual memory management" - just leak / use an arena "but no generics" - you won't need them for a script, but if you really must then void * and macros are things "but mandatory types" - C23 has type inference "but no data structures" - arrays are all you need "but integers are finite" - like you're gonna overflow a long long
I am a hobbyist programmer (majored in Economics, so I have some experience in R and Stata). Self taught. A lot of content is really bland and makes it hard to get into. I just want to thank you for bringing your personality into the computer science realm. It makes it a lot easier to be captivated by the content being presented - making it a lot more effective for learning. Sometimes I wish I went to school for computer science instead, but I can honestly say I love economics.
I subscribed a few days ago. And I just love it when Lua is recognized. I thought I was the only one who loved it locally. (Brazil Mentioned: I'm not from there but dammit! Love that they are mentioned). Then I went to the smoke shop next door from my apartment. All of us college dev's hang out there. Yup. Lua has its fans. Python is my first that I mastered, but Lua is what I first picked up. And I went back to it after success with Python. Lua needs more LOVE....(return a 1 if you know the double meaning of that).
I'm using C++ and LUA daily since many years, so they're both S-Tier in my programming languages tiers list (for completely different reasons). No real opinion on other languages since I rarely use them, ofc there is what I call the "classic webdev duo" (PHP and JS) I use sometime. Python is also great to make quick program and there is a big community around.
Python as a slightly better Bash is S+ tier. Python as an actual programming language to build complex software system is the biggest drum of b&llsh$t humanity has ever conceived.
I learned from one TH-camr that to read C++ consts if it's in the beginning (which means there's nothing to its left to make it const) then it makes the first thing to its right a constant, but wherever else you put it it makes the thing to its left constant
"Features are for the weaks", man i got you. Don't be afraid to use pointers if necessary. Your responsibility as a programmer is to write good software. Prioritizing safety and an easier path can make you a weaker programmer
“Php is only useful for the web and even that is easily done with other languages” is one hell of a take lol You could do web in other languages/stacks, and have an objectively worse time, all the time. PHP Lives and Dies by the Request/Response life cycle which is 👌 perfect for delivering web pages. You know what else is fantastic as a Request/Response? CLI tools. Yes. Absolutely. PHP is so shocking excellent at making CLI tools I’ve stopped using python and C++ in favour of it. I wouldn’t advocate for an S tier or anything but it absolutely does not belong in E lol it’s way too useful for that
Many years ago I wrote quite a lot of CLI tools in PHP… Why? I didn’t want to add any additional software onto the server, and PHP can handle everything I needed it to do. It does fantastic at CLI tools, just like a web page, feed it options (query params) and let it generate a response. Who said it *needed* to be HTML in the output?
For those curious, std::pin simply means the memory address is locked, while std::unpin will allow it to change memory locations. For example, if you want rearrange the data to sit in memory better, you can pin specific values to an address and know that they will always be in that location. Not far from describing pinning a note to a cork board. Now, from what I understand of this, it sounds like a way to memory map. I would think this would be more bare metal, but I don't know what it could be used for outside of memory mapping.
I piddled around in BASIC as a kid, and in high school I took a class where we did Pascal on greenscreen dumb terminals. But my first nontrivial programming language was C. I remember the day I learned about pointers. I had a massive headache. Then I added C++ to my toolkit. I liked that wrapping stuff in objects made it easier to pass larger payloads of information around. I did some Java in college for EE (along with some more C, C++, and assembly), and I've dabbled in Python, JavaScript, PHP, MATLAB, and some other esoteric stuff (LabVIEW, anybody?). But when I need to actually get stuff done, I always go back to C or C++. My younger brother got a CS degree and learned entirely in C#. Then he got a job and saw "malloc" in code he was maintaining. He didn't even know what it was.
For rust, I think the pinning is the making a object constant without declaring it as such when its created or its value defined, so that another async op needing it, can set it to be a static object, before returning and it can get unpinned
Ah, templates. Had one course of C++ where the lecturer wanted us to use templates from the get-go basically (25 years ago). It was PAINFUL. Pivoted from software to telecom after that course. :P
I mean, there is code that will make typescript complain but is allowed in javascript, such as this: const a = 0; a = "0"; It will still "transpile" the code to javascript, but it will also tell the user that there is an error. Not sure if you can call it a superset if it doesn't think it's valid.
"I think everyone's first language is special" might be why I favor the use of whitespace and indentation in python. VB was my first language, and though I don't care for it and haven't used it in ages, writing python feels so much like vb it's unreal.
But a better way to write const in c++ is "T const* const" (or for example "T const&") It makes much more sense, because you can literally read it (from right to left) as "const pointer to a const T"
@@isodoubIetit’s good to be different, but that’s a wild take, man. Mathematics (and therefore science) notation has been 1 indexed since Newton and Leibniz. Literally everything is based on that, from matrices, to series, to graph theory to everything that uses numbers…
@@alst4817 It's not at all "wild". It's a perfectly normal and reasonable take. The arguments for 0 indexing have been made in extreme clarity (by Dijkstra) in the 80s and they don't really depend on setting, so it'd be really surprising if math happened to be different. Try to manipulate any sort of nontrivial series summation with 1-indexing vs 0-indexing, and then tell me which one is easiest. Or try to index into an n-dimensional array. Yes, people in the 1600s didn't know better. That's no excuse for making the wrong choice in the 21st century.
Java changed my life 25 years ago. Rescued me from Window's client server hell and cured me of my Smalltalk fantasies. It has had the greatest impact on the software engineering profession than anything else in history.
@@keldencowan At the time there were three vendors of Smalltalk. The language was awesome. The IDEs they provided were awesome. But the final product was mostly unusable. Connecting to various databases was expensive or not possible. The real problem was they couldn't generate an executable application file with a reasonable footprint. Java came along and gave as an OO language that could do everything for everyone. In those days we made desktop client server apps using PowerBuilder, Delphi(me), and a little later C++ with Visual Studio. They only worked on Windows and required sophisticated UI programming and were a hassle to deploy to users and get them working for everybody.
For use as well. We were in hell with Windows client back in the day. Moved to Java and we were happy. Still use it now. We're doing Data Engineering with Databricks all running on the JVM. Super cool stuff.
If you're consistent, there's no confusion on const-correctness: int const * const foo(int const * const & ptr) const I never allow the "left-to-right" exception to const-correct reading rules.
I don't get the love for C over C++, you can program in C++ exactly like C and benefit from stronger type safety and, if you choose, make use of built in classes, references, templates etc.
I think the hate is mainly from when you have to interface with someone else's code abomination. Some people see the language feature set, and have to use the whole language feature set.
9999999999999999 becoming one higher is not a JS problem but just yet another general FP number limitation as defined by IEEE 754. If I cast this integer to a double sized floating point in any language, for example in Rust via 9999999999999999 as u64 as f64, I see the exact same thing happening. Many things in JS are trashy design, but FP precision related limitations are not. I liked the video! Though I think C# and actually also Java should really be above TS.
@@KangoV Prime is a smart guy, I expect better. The thing with both Java and C# is that both languages have evolved a lot, things have changed. Yes they still have some legacy things in their design too, but it's so much better than many other languages from before. And issue is that there is still a lot of poorly written old enterprise source code around, and I know that too, I know some 20 year old C# code really well from work. But it's unfair to judge the modern version of these programming languages for that.
16:04 - idk I think it would make sense, I think you're thinking about the end code, maybe this like works on kernel. (speculation) Like it's a feature included to allow the compiler to prevent you from compiling moving memory accidentally. Still if it's that, you know Rust right, do you need a feature for that?
Gold Take: "Stop Prefacing" Annoys the hell out of me. Of course its your opinion, you said it. No one needs to be told that, and if they do that person isn't worth talking to.
im someone who is pretty basic in there programing ability, and I recently tried rust, go and c# (from allways using js and python) and I have to say that c# is really nice, if I'm going to use types I might as well use a language where its built in and has great intelisense instead of typescript which I never got the hang of.
The biggest flaw with C# is Microsoft messing substantially with the memory of C# so that it makes me have to rely upon more recent tutorials for anything involving functions or arrays. It works pretty well outside of that so long as you have IntelliSense
The c++'s std::variant definition mess showed in the video is actually not that horrible (pretty much everything else about std::variant is, though). Most of the typing is only namespace resolution. Then, the goal is to enable or disable the usual copy/move constructors/assignment operators based on the properties of the types in the variant. It makes the top level of std::variant trivial as all operators can now be defaulted. Private inheritance is a very usefull metaprogramming feature to conditionnally define member functions (and sometimes variables) based on template parameters properties.
Templates in c++ are compile time executed and therefore pretty ugly to debug. But they are lightning fast. Together with the STL they provide a sweet spot between performance and usability. Try to outperform the STL in any task. It is very hard and for most impossible.
If you're not extremely careful, they blow up in code space which thrashes your instruction cache. But in the hands of an artist, you can achieve performance not far below hand-coded assembly language.
honestly i don't understand the dislike towards PHP. The only reason for the hate is it's history. Mainly the fact that the wrong "developers" were using it back in the day and produced some crappy code (ok to be fair it wasn't the best langauge but big changes happen with PHP5). It's not the language to blame is those using it. Leave someone who doesn't know a thing to writte some code on the most secure language and they will mess up big time for sure (yeap i know PHP defender here lol).
When all the other languages made fun of me, php was like "hey kid, you want a job" and so I joined the elephant sect
C# devs dont even care if you shit talk the language as long as you put it above java
Lmao 😂
I am a C# dev, and I agree
I have just started to learn programming but this jokes are so hilarious 😂 😂
I don't even know that much right now but jokes are too funny
C# is a superfluous language because it came after Java. If C# were first, then Java would be superfluous. Fewer languages in the world = better. We realistically need half a dozen languages for 99% of the world’s programming.
Yes
JDSL should be at the top
Tom is a genius
Ha...We will always remember.
It encourages people to stop writing comments (which are the devil). Tom is in fact a genius.
I'm glad I didn't miss that video. JDSL ftw
As the creator of C++ once said: "There are only two kinds of programming languages: the ones people complain about and the ones nobody uses." **Bjarne Stroustrup with sunglasses and the next episode by Dr. Dre playing in the background**
Its the one and only D O double G@@andreimoraru1043
Go syntax with rust borrow checker
Everyone complains about Java 🤣
@@KangoV and nobody uses it anymore , Java won the game
@@monad_tcp at my work, java sucks, python sucks, C++ sucks, C SUCKS. people just be hating cause they sucking. LOL
Vote for Prime to make a BLAZINGLY FAST programming language of his own.
He should call it 'the languagen'
huh its obviously the JDSL wdym
I want this 😂😂😂
Real talk, this is a colossal waste of time
@@TVIDS123 what will matter in a hundred years?
My favorite quote: "All that rust has produced is already existing software, but with color", because it's so damn accurate. I feel called out.
Yeah, this color means the union of conveniency and speed.
@@linkernick5379
>Rust
>convenient
@@user-pe7gf9rv4m
ripgrep > grep
bat > cat
fd > find
alacritty > xterm
mcfly > Ctrl+R
😉
@@user-pe7gf9rv4m
Yes:
ripgrep > grep
fd > find
bat > cat
alacritty > xterm
cargo >>>> cmake
@@user-pe7gf9rv4m Yes:
ripgrep > grep
fd > find
bat > cat
alacritty > xterm
cargo >>>> cmake
In the c++ example the leftmost const is actually the one that makes the value const, and the second const makes the pointer constant. Const is applied to the thing to it's left unless there is nothing to it's left, in which case it applies to the right.
True. He should read it from the right to the left.
@@SoutParlexactly. "This pretty straight forward ..." and got it wrong 🤣Reading right to left is the easiest way to handle it.
what the fuck is wrong with c++
@@rokker333 This is what C/C++ is like. This is why everyone is racing to replace both those languages. C - Zig, Odin, Onyx. C++ - Rust, Carbon (and maybe Lobster).
@@TJackson736 Keep trying, C++ and C will always say "Through the heavens and the earth, I alone I'm the fastest one"
I strangely relate to that feeling of Java having a place in your heart. I can easily list all the reasons I don’t like Java and yet sometimes I feel homesick for it. Makes no sense.
It's kinda like your first spoken language. You are more likely to think in terminology or concepts based on that first language.
There are many languages I'd rather write code in, but Java really isn't as bad as people say it is. Java 1.5 and lower was absolutely awful, but things started getting better in Java 7 and especially 8. Now it actually feels like a modern language.
After spending a lot of time in the TS world, you start to realise how nice it is to have explicit interfaces at run time, nominal sealed classes, and real enums with properties and method and whatever.
The only issue is that the Java world is the opposite of the JS world, instead of hype driven development there’s still companies on Java 8 who don’t trust recent LTS versions still.
Oh and that exception situation is weird.
Kotlin’s a nice sweet spot.
Until you realise everything needs to be an object that modifies itself @@CottidaeSEA
It's god tier for getting a job in my country
I love Lua... and because of that I have to agree it is C tier...
But that's fine, it never aspired to be something better. All it wants to do is to hold hands and be hugged.
It's like a child, it can run little errands, do occasional odd jobs and play around.
You wouldn't ask a child "WHY YOU DO THAT?" in anger right? It's a child, be nice...
I know you really love it and try to get so deep in it the way you explained it, I've never seen any code written in Lua but I like how you described it 👏👏
@@m96fa40 It's 22 keywords in total, none of those are unique.
Learning it takes an afternoon.
It's a glue language supposed for tacking stuff together, made to interact with C.
This gives it the power to be easily integrated with almost everything.
It is basically the home assistant of programming languages, can do tons of stuff but has its caveats.
e.g. like C it does as told, regardless of if it's a smart move to do that.
Also t a b l e is epic
You always know someone loves a programming language when they know every single specific flaw in depth as if they had run across it a thousand times.
Correction at 19:05 : It is the other way around. You have to read it from right to left. Here is a breakdown:
const int* const foo(const int* const& ptr) const
1. const int* const
Means that the method returns a const pointer to an int that is const
2. const int* const& ptr
Means that the method takes a reference to a const pointer which points to an int that is const as an argument
3. const
Means that the method cannot change member variables (unless they are marked as mutable or you cast away the const using const_cast)
Personally I find the east const convention more intuitive:
int const *const foo(int const *const &ptr) const;
Now const always acts to the left. int const is constant int, int const * is pointer to constant int, int const * const is constant pointer to constant int, etc. Downside is it's unfamiliar (and code like the above is extremely uncommon), so I don't use it at work to avoid confusing my people.
I so hate mutable, const_cast, friends, ... Fix your model, fix your code. This value should never be changed, but feel free to change it.
@@barongerhardt yeah mutable is terrible except in lambdas, and people use it for the worst reasons.
"Oh I have a getter which caches for performance, so I'll make the cache mutable so the getter can still be const even though the cache means it's no longer const in any sense wee lying is fun"
Getouttahere
Yep I noticed the same! Not writing in C++ every day though, but these things I know.
But what I do not know, is the situation in TypeScript. Is it opposite there? Because that may of course be a large source of confusion then.
Many C family languages have a preceding type notation style, also including Java, C# and Go, but some are more into the trailing form.
I know that like Rust, TS does it's in types trailing notation. So I can really imagine a difference with the const keyword as well.
@@jongeduard Constness is different in JS/TS land.
In JS/TS `const` is used to define a const reference to an object. It's the reference that cannot change, not the object that it points to. Whereas using `let` allows you to later change the reference.
In both cases, you are free to change the properties of the object being referenced.
In TS there's `readonly` which you could apply to properties. This is what statically checks and prevents you from modifying said property.
There's also `as const` which is used to cast all properties of an object as readonly. I believe it's also used to define literal types.
In JS, there's also Object.freeze() which prevents modification of an object's properties.
All in all, a different language. Don't forget that JS is an embedded language and can't do anything practical on its own. Its core and implementation resides in C++ (V8 in Chromium based browsers for ex.) TS is just a static analyzer on top.
"Everybody's first language is special"
Yeah, mine was C++ and its NOT
Someone gifted me a C++ book in 1995. It was MSFT Win32 foundation classes. It took me 4 years to return to coding again, and I never touched C++
@@thatryanp I had similar experience. I was taught pointers, oops and other concepts in c++ on a blue screen, dos like terminal called turbo c++. If you want somebody to hate programming, start there.
I started with C++ more than a year ago and i gotta say it's hard as fuck
no like if you say Java or sum shit are hard as fuck, then C++ is harder than fuck
but what can i say it's insanely powerful I've written some graphics and malware with it and i gotta say they were good and fast
C++ is a cruel parent but an effective teacher
This is the first programming tier list where I finally see no Javascript on S tier.
yea, but then PHP is below JS, which is just hilarious. As for 2024 Javascript as a programming language is worse than PHP in nearly every conceivable way.
@@SkywalkerWroc I don't think it is that worse, I'm actually working with it and feels fast and suitable for server-side computing.
@@SkywalkerWroc Are you talking about JS without TS?
@shazam314 yes, of course.
@@SkywalkerWroc Then I could agree with you with that because PHP has built-in types now?
Types are necessary for any software project, and TS makes JS so much better.
The idea that PHP's only use case is web development is way wrong. I have a very large neural network for machine learning running in PHP with no web interface to it... people that hate on PHP have either never used PHP or haven't used it since version 4... this is just a fact.
Well Python runs like dogcrap and people act like it's the saviour because it has some good libraries. People are too stupid to think for themselves.
@@JamesSmith-cm7sg python is PAINFULLY slow. But yeah, anything you want to do has already been done and published in library or module, so it can be great for prototyping or proof of concept stuff. I would never use it in production though.
@@JamesSmith-cm7sgbecause i can build a prototype for almost anything that will read like english and then compile that to an exe in C or rebuild it with a working model to reference in something like go. And thats if its actually slow, most of the time its more than fast enough and when it isnt, its because your using the built in features wrong, or not using the right ones for the right jobs
Only retards hate on PHP they never used it, they are just taught it's crap and can't judge by their own.
I used version 5 and it was dog water
I've got the top 1 or 2 languages I think everyone can agree on.
1: The one you're most adept at.
2: The second one you're most adept at.
You can fill in the rest.
PHP in the E-tier?!
List invalid.
mom
The legend himself! ❤
Ur famous
JŚON, stop calling JMÖM
I've been a developer for 12 years now and I used Java for the first 4 years of it. I do not miss it lol
Still use it. Ingesting 200,000 dns queries per second. our code + Spark, Kafka, Cassandra, Druid. It's awesome.
Even though not first (which was c++) , java was a the one I heavily trained in and got a job for....
😅 still happy I changed group
@@vaisakh_km Java 23 is insanely good. We're writing some amazing stuff and all compiled to native code running bindingly fast! Check out 1 Billion Row Challenge. Only language that was faster was C (and not by much). Reading and processing 1 billion rows in 1.5 seconds!
Prime in Brazil is such a vibe dude fuck yeah I love this guy
yeah
Imagine if go had null safety, option types and union/sum types... literarly goat lang
.. with opt in manual memory management for perf critical sections
100%
@@steveoc64 Oof, that sounds like overreaching its domain to me. Languages that try to do everything always become worse for it, in my experience.
@@Muskar2 yep I know what you mean - take the addition of generics and alternate for loop syntax for example. Need to keep it simple.
Just from the point of view of a large scale deployment- mmm is the one single thing we would have chosen if we had a voice in it.
That would have been the difference between optimising existing bottlenecks vs going for rewrite in a different tool in a lot of cases
@@steveoc64 I don't like GC either. But I think mmm is best suited for languages that specialize in it. Like Odin-lang, where allocators are first class.
BRAZIL MENTIONED 🥳 Brazil ♥ ThePrimeagen
PHP the most underrated language ever
i love php
this post was made by the php lovers gang
Most overrated so they still use it while it’s bad
@@tuananhdo1870 It’s simple, cheap and effective if you know your job. it’s not language that’s bad but a developer. i say that other languages are just decorated php with all that fancy “features” which just makes them much more complex but making literally zero changes
I don't know if anyone here reads the comments, but Python is the best language for getting out your ideas. If I have an idea for a program, or a basic app I can do all of it in Python test it maybe even stick with just that if it's good enough. Then once I have everything down, and looking right I can go ahead and recode everything into a language that may be better for what I am trying to accomplish like C.
It's basically pseudocode that compiles, it's awesome
like usable pseudocode
@@bobbodaskank you stole it out of my mouth.
haha! I do the same with Perl...
LUA is incredibly useful if you ever need to embed a scripting language into an application. And there are a lot more reasons to do this than the average lay person might suspect.
I believe that since all of Valve's games, support modding and Lua is the main scripting language used for them. So I can assume that you can integrate Lua modding in your game easier than with other languages.
C++ standard library is super ugly for two main reasons: it must only create identifiers defined by the standard or with the reserved double underscore or underscore Capital patterns; and it often wants to share behavior without hitting the C++ issue where each base class must have a separate address by using recursive template definitions and other metaprogramming techniques.
They don't actually write the code with the underscores, btw, it's run through an uglifier script.
Pin on a pointer type is a promise that you can depend on what's in a pointer staying valid as long as the pointer is valid. Unpin on a pointee means that it doesn't need that promise, and that you can move it out anyway.
Pin is needed for generic/library code to be able to trust that it can keep interior pointers around, in particular for async code to keep references to other stack variables around at an await point. You can commonly provide it either by pinning an existing value to the stack with pin!, or moving it to the heap with Box::pin(), both of which prevent you from moving the value out.
Unpin means a type doesn't need to be pinned, or equivalently, that you can safely remove the pin. It can be used either to assert than a type doesn't require pinning, or to allow generic code to let callers have a nicer API if they know it doesn't matter for some type, as methods can be conditionally available on a generic parameter implementing a trait.
A confusing detail is that pinned pointers are themselves a good way to get an Unpin from a value that isn't already Unpin: this is because if it's already pinned, you don't need to work about adding any more pinning.
There are some "things you can do in JS" that TS by default won't let you do even though it is actually safe. But thats more that ALL JS runtimes have certain standard library things behave one way but the spec is more strict. And TS has those all typed to the spec.
Isn't there a declaration you need to make to put Typescript in strict mode?
We need to just stop using Javascript for anything other than front-end scripting. Y'know, the thing it was designed for. It's easy to say JS is a trash language when you use it in a domain it isn't meant to be used.
It's like trying to use Java on something that isn't a blueray player, or Python on a computer. When you use a language not how it is designed to be used, it'll seem like trash.
well even then, C is the best scripting language
@@anon8510 C is a scripting language to avoid writing assembly, so obv all software should be written in it, as there are no bounds to what you can do with it.
Btw, do YOU know what scripting is?
It's trash for frontend scripting too.
Appreciate the python dunk though
@@anon8510 I know, it was a joke :)
@@anon8510 warning: text wall and hot take
scripting is the act of writting short, quick and dirty programs "scripts" or parts of programs, which can be either to alter the behaviour of a preexisting system without recompiling most of it, or for accomplishing tasks as they come up
C shines most in that kind of environment where you don't necessarily want a fancy language complaining about out-of-bounds array accesses or reading uninitialized memory when you either know why you're doing it or don't care about the possible consequences
and with how simple the language is, you want even notice recompiling most script-scope shared objects / mini-programs
try writing a simple single-use command-line program with zero attention given to either security, performance, error tolerance, generalisability, maintainability or readability and you'll find C is the easiest answer in most cases, though sometimes beat by Perl or Python
want to embed a scripting language in an app you're making? you could add a dependency on an interpreter and do complex maneuvers to respect your guest language's assumptions, or you could just dlopen(3) a shared object, probably written in C, that couldn't care less what you do with its memory (not mentioning that if you provide a C API, adapters for many other mainstream languages are trivial to implement (if it isn't automated))
"but manual memory management" - just leak / use an arena
"but no generics" - you won't need them for a script, but if you really must then void * and macros are things
"but mandatory types" - C23 has type inference
"but no data structures" - arrays are all you need
"but integers are finite" - like you're gonna overflow a long long
I am a hobbyist programmer (majored in Economics, so I have some experience in R and Stata). Self taught. A lot of content is really bland and makes it hard to get into. I just want to thank you for bringing your personality into the computer science realm. It makes it a lot easier to be captivated by the content being presented - making it a lot more effective for learning. Sometimes I wish I went to school for computer science instead, but I can honestly say I love economics.
I subscribed a few days ago. And I just love it when Lua is recognized. I thought I was the only one who loved it locally. (Brazil Mentioned: I'm not from there but dammit! Love that they are mentioned). Then I went to the smoke shop next door from my apartment. All of us college dev's hang out there. Yup. Lua has its fans. Python is my first that I mastered, but Lua is what I first picked up. And I went back to it after success with Python. Lua needs more LOVE....(return a 1 if you know the double meaning of that).
The rust compilation complete in the end was *chef kiss*
PHP! I built my app with PHP. Great for new developers.
I'm using C++ and LUA daily since many years, so they're both S-Tier in my programming languages tiers list (for completely different reasons).
No real opinion on other languages since I rarely use them, ofc there is what I call the "classic webdev duo" (PHP and JS) I use sometime.
Python is also great to make quick program and there is a big community around.
It's like listening to one of the Sklar brothers talk about computer science. I love it.
Python as a slightly better Bash is S+ tier.
Python as an actual programming language to build complex software system is the biggest drum of b&llsh$t humanity has ever conceived.
I learned from one TH-camr that to read C++ consts if it's in the beginning (which means there's nothing to its left to make it const) then it makes the first thing to its right a constant, but wherever else you put it it makes the thing to its left constant
Nice of you to give the dude like 200 subs, well done
He is at 14k subs now
Take a drink every time ThePrimeagen appears on the video ThePrimeagen is reacting to.
"C# is better than Java" is a ringing endorsement from Primeagen! 😁
Along with a shit ton of bias :)
yeahhh finally someone who thinks rust has too many features.
i want someone who thinks like Go/C bare min but you can move the world with it.
"Features are for the weaks", man i got you. Don't be afraid to use pointers if necessary. Your responsibility as a programmer is to write good software. Prioritizing safety and an easier path can make you a weaker programmer
I avoided go for like 5 years and finally tried it this year. It is so easy! It’s easy to compile and is no where near as buggy as JS
“Php is only useful for the web and even that is easily done with other languages” is one hell of a take lol
You could do web in other languages/stacks, and have an objectively worse time, all the time. PHP Lives and Dies by the Request/Response life cycle which is 👌 perfect for delivering web pages. You know what else is fantastic as a Request/Response? CLI tools. Yes. Absolutely. PHP is so shocking excellent at making CLI tools I’ve stopped using python and C++ in favour of it.
I wouldn’t advocate for an S tier or anything but it absolutely does not belong in E lol it’s way too useful for that
I have done that a bunch. It is a nice middle ground between bash and c.
Many years ago I wrote quite a lot of CLI tools in PHP…
Why?
I didn’t want to add any additional software onto the server, and PHP can handle everything I needed it to do.
It does fantastic at CLI tools, just like a web page, feed it options (query params) and let it generate a response.
Who said it *needed* to be HTML in the output?
For those curious, std::pin simply means the memory address is locked, while std::unpin will allow it to change memory locations. For example, if you want rearrange the data to sit in memory better, you can pin specific values to an address and know that they will always be in that location. Not far from describing pinning a note to a cork board.
Now, from what I understand of this, it sounds like a way to memory map. I would think this would be more bare metal, but I don't know what it could be used for outside of memory mapping.
My first language was basic and yes, it is a special language.
That COBOL Fortran code is definitely COBOL. Statement ending in full stop 👍
I thought PIC was only in COBOL. My memory is fuzzy as I have learned 1,337 programming languages and get the details confused.
The rust take is pretty accurate... you know which one I mean.
Prime: "I think everybody's first language is special"
Me (who's first language was small basic): HELL FUCKING NO
I don't really love PHP that much, despite I have to use it nearly every day. But E tier is definitely inappropriate
15:12 the "Haram" tier sad matlab
prime-lang is a language optimized to be the number one in any tier list.
ELixir Mentioned Letss goo
I piddled around in BASIC as a kid, and in high school I took a class where we did Pascal on greenscreen dumb terminals. But my first nontrivial programming language was C. I remember the day I learned about pointers. I had a massive headache. Then I added C++ to my toolkit. I liked that wrapping stuff in objects made it easier to pass larger payloads of information around. I did some Java in college for EE (along with some more C, C++, and assembly), and I've dabbled in Python, JavaScript, PHP, MATLAB, and some other esoteric stuff (LabVIEW, anybody?). But when I need to actually get stuff done, I always go back to C or C++.
My younger brother got a CS degree and learned entirely in C#. Then he got a job and saw "malloc" in code he was maintaining. He didn't even know what it was.
For rust, I think the pinning is the making a object constant without declaring it as such when its created or its value defined, so that another async op needing it, can set it to be a static object, before returning and it can get unpinned
Haram-tier is pretty funny.
How in the world did the CORONATION STREET theme tune make the start of this vid
That's what I was thinking.
A real man of culture
Ngl, I like Python. It does what I need it to.. most of the time.
My first language was C++. It does not have a special place in my heart.
I love Lua. Everything is a table. Yes, even you. Everything. Is. A.Table.
Very cool!!! Got tons of insights, subscribed to you guys!
Thank you so much for making these Videos! Makes my day!
Ah, templates. Had one course of C++ where the lecturer wanted us to use templates from the get-go basically (25 years ago). It was PAINFUL. Pivoted from software to telecom after that course. :P
I mean, there is code that will make typescript complain but is allowed in javascript, such as this:
const a = 0;
a = "0";
It will still "transpile" the code to javascript, but it will also tell the user that there is an error. Not sure if you can call it a superset if it doesn't think it's valid.
"I think everyone's first language is special" might be why I favor the use of whitespace and indentation in python. VB was my first language, and though I don't care for it and haven't used it in ages, writing python feels so much like vb it's unreal.
19:17 you're supposed to read it from right to left!
const T* const
^ a const pointer
const T* const
^ to a const value
But a better way to write const in c++ is "T const* const" (or for example "T const&")
It makes much more sense, because you can literally read it (from right to left) as "const pointer to a const T"
Oh yay, more reaction content. Time to go find the original instead!
Thanks for the single threaded clarificalrions. When we say js we talking the whole thing and that is multi-threaded. That tends to confuse begginers.
Thoughts on Julia, would love to see you finally use a BLAZINGLY fancy language…
It's a beautiful (except for one-indexing which is hideous) overdesigned buggy mess
@@isodoubIetI think 1 index makes a *lot* of sense for specifically math and science programming which is what Julia focuses on.
@@alst4817 In fact, scientific/math intensive programming is one of the settings where the advantages of zero-based indexing are clearest.
@@isodoubIetit’s good to be different, but that’s a wild take, man. Mathematics (and therefore science) notation has been 1 indexed since Newton and Leibniz. Literally everything is based on that, from matrices, to series, to graph theory to everything that uses numbers…
@@alst4817 It's not at all "wild". It's a perfectly normal and reasonable take. The arguments for 0 indexing have been made in extreme clarity (by Dijkstra) in the 80s and they don't really depend on setting, so it'd be really surprising if math happened to be different.
Try to manipulate any sort of nontrivial series summation with 1-indexing vs 0-indexing, and then tell me which one is easiest. Or try to index into an n-dimensional array. Yes, people in the 1600s didn't know better. That's no excuse for making the wrong choice in the 21st century.
I'm so yoinking that leader ee remap lmao, I love it
"Everyone's first language is special ". I agree. I still love BASIC. I don't care what anyone says....
2:32 The thing about Google is that you never know if they help you out with information while selling your ass to the highest bidder; hence trash.
Top marks for making S - Green and E - red 👏
The cut at the end killed me, well done
I was ready to rage comment "R3aCt I5nT A L@nGU@G3"...he had me in the first half
Lua popularity exists because of the popularity of Factorio. The Factory Must Grow!
Java changed my life 25 years ago. Rescued me from Window's client server hell and cured me of my Smalltalk fantasies. It has had the greatest impact on the software engineering profession than anything else in history.
Can you elaborate?
@@keldencowan At the time there were three vendors of Smalltalk. The language was awesome. The IDEs they provided were awesome. But the final product was mostly unusable. Connecting to various databases was expensive or not possible. The real problem was they couldn't generate an executable application file with a reasonable footprint. Java came along and gave as an OO language that could do everything for everyone. In those days we made desktop client server apps using PowerBuilder, Delphi(me), and a little later C++ with Visual Studio. They only worked on Windows and required sophisticated UI programming and were a hassle to deploy to users and get them working for everybody.
For use as well. We were in hell with Windows client back in the day. Moved to Java and we were happy. Still use it now. We're doing Data Engineering with Databricks all running on the JVM. Super cool stuff.
I want you to create "The Prime Playlist of Rust" with realtime-projects
If you're consistent, there's no confusion on const-correctness:
int const * const foo(int const * const & ptr) const
I never allow the "left-to-right" exception to const-correct reading rules.
I don't get the love for C over C++, you can program in C++ exactly like C and benefit from stronger type safety and, if you choose, make use of built in classes, references, templates etc.
There is something nice about the simplicity of C, even if it is not a very practical language.
I think the hate is mainly from when you have to interface with someone else's code abomination. Some people see the language feature set, and have to use the whole language feature set.
@@mattsgamingstuff5867 That makes some sense, but even so, it's just an opportunity to learn features which may be useful to you in the future.
THANK YOU for calling out preface culture. "This is just my opinion" I KNOW. YOU ARE SAYING IT. PRESUMABLY IT'S YOURS HOSS
9999999999999999 becoming one higher is not a JS problem but just yet another general FP number limitation as defined by IEEE 754.
If I cast this integer to a double sized floating point in any language, for example in Rust via 9999999999999999 as u64 as f64, I see the exact same thing happening.
Many things in JS are trashy design, but FP precision related limitations are not.
I liked the video! Though I think C# and actually also Java should really be above TS.
"Though I think C# and actually also Java should really be above TS" -- Not on this channel. Too much implicit bias going on.
@@KangoV Prime is a smart guy, I expect better.
The thing with both Java and C# is that both languages have evolved a lot, things have changed. Yes they still have some legacy things in their design too, but it's so much better than many other languages from before.
And issue is that there is still a lot of poorly written old enterprise source code around, and I know that too, I know some 20 year old C# code really well from work. But it's unfair to judge the modern version of these programming languages for that.
Why do they never include the IEC 61131-3 languages? My vote will forever be for Structured Text. /s
FBD rules
@24:55 “anyways, back to react” *reacting to op talking about react* 👏🏽 🌹
Just wanna hear Prime talk about Python for a full 30 minutes straight so I can get more perspective.
There is only one god tier language and computers wouldn't work without it, and that's Assembly.
4:50 "It's somewhere between a laugh and a war crime" kkkkkkkkk That's right 😅
Ascendant tier: Lisp
16:04 - idk I think it would make sense, I think you're thinking about the end code, maybe this like works on kernel.
(speculation) Like it's a feature included to allow the compiler to prevent you from compiling moving memory accidentally.
Still if it's that, you know Rust right, do you need a feature for that?
Gold Take: "Stop Prefacing"
Annoys the hell out of me. Of course its your opinion, you said it. No one needs to be told that, and if they do that person isn't worth talking to.
im someone who is pretty basic in there programing ability, and I recently tried rust, go and c# (from allways using js and python) and I have to say that c# is really nice, if I'm going to use types I might as well use a language where its built in and has great intelisense instead of typescript which I never got the hang of.
3:25 Inb4 Google decides to axe Golang and you will be forced to rewrite everything in something else.
The biggest flaw with C# is Microsoft messing substantially with the memory of C# so that it makes me have to rely upon more recent tutorials for anything involving functions or arrays. It works pretty well outside of that so long as you have IntelliSense
What has changed in regards to strings?
Pinned memory means that it is guaranteed to be in real memory and not virtual memory (or paged out)
If you come to Brazil, be sure to eat a Coxinha (say it like this: "Coshinya" )
You should make a programming tier list with esoteric programming languages
The c++'s std::variant definition mess showed in the video is actually not that horrible (pretty much everything else about std::variant is, though). Most of the typing is only namespace resolution. Then, the goal is to enable or disable the usual copy/move constructors/assignment operators based on the properties of the types in the variant. It makes the top level of std::variant trivial as all operators can now be defaulted. Private inheritance is a very usefull metaprogramming feature to conditionnally define member functions (and sometimes variables) based on template parameters properties.
Templates in c++ are compile time executed and therefore pretty ugly to debug. But they are lightning fast. Together with the STL they provide a sweet spot between performance and usability. Try to outperform the STL in any task. It is very hard and for most impossible.
If you're not extremely careful, they blow up in code space which thrashes your instruction cache. But in the hands of an artist, you can achieve performance not far below hand-coded assembly language.
I love that GO in our native language as it sounds means sh*t 😂😂😂😂
honestly i don't understand the dislike towards PHP. The only reason for the hate is it's history. Mainly the fact that the wrong "developers" were using it back in the day and produced some crappy code (ok to be fair it wasn't the best langauge but big changes happen with PHP5). It's not the language to blame is those using it. Leave someone who doesn't know a thing to writte some code on the most secure language and they will mess up big time for sure (yeap i know PHP defender here lol).
My favourite programing cult is holy c.