Порридж В Ко-ливинге
Same with
Viktor
Guys, let's just make an example, probably it'll help to understand → https://codepen.io/vitkarpov/pen/oNjamBe
Порридж В Ко-ливинге
const function1 = (object) => object.max const obj1 = {max: 5}, obj2 = {max: 7} function1(obj1) == 5 function2(obj2) == 7
const function1 = ({max}) => max const obj1 = {max: 5}, obj2 = {max: 7} function1(obj1) == 5 function2(obj2) == 7
Evgeniy
Nothing breaks, right?
What about this? obj = { one: 123, two : 456 } // ints obj2 = { one: 'vasya', two: 'pupkin' } // strings
Порридж В Ко-ливинге
Js have implicit types, so no
I mean, types are implicit
Evgeniy
Is it convert all that stuff to strings?
Viktor
Is it convert all that stuff to strings?
depends, but if you try to add a number and a string — it'll be strings
New
Ok ty
Viktor
the engine doesn't know what to do with 'abc' as a number but knows what to do with '3' as a string
Viktor
if it makes sense
Viktor
Ok ty
no problem 🙂
New
How many languages you alk know ?
Порридж В Ко-ливинге
How many languages you alk know ?
It does not matter, when you learn 2-3 of them, you ll know most of them
Viktor
How many languages you alk know ?
C++, JavaScript, a little bit of Python, a little bit of bash and awk if it counts 🙂
Viktor
We don't count CSS as a language, do we? 😂
Порридж В Ко-ливинге
Like, you just need 3 of them
Порридж В Ко-ливинге
We don't count CSS as a language, do we? 😂
I am professional senior tech-lead HTML developer 😎😎😎
Evgeniy
depends, but if you try to add a number and a string — it'll be strings
Oh... dynamic languages are place of simple errors
Порридж В Ко-ливинге
Порридж В Ко-ливинге
It's place of bugs
Порридж В Ко-ливинге
You'll never get error
Порридж В Ко-ливинге
You'll get Unexpected crap
Viktor
"At least it compiles all the time" (c) 😉
Viktor
You'll get Unexpected crap
undefined crap is not a function
Evgeniy
undefined crap is not a function
undefined is undefined
Evgeniy
:)
Порридж В Ко-ливинге
What are they ?
Like, low level, C, middle level, like C++ (or C#, Java, Obj-C) And high, Python or JS, or Kotlin or Swift
Порридж В Ко-ливинге
undefined is undefined
That was true in old JS
Порридж В Ко-ливинге
What are they ?
I'm not saying, you SHOULD know them, just saying that these groups contain similar languages
Viktor
We also have to agree what means "to know" to us 🙂 Kind of a different story from "being able to write complex system in it and live within its ecosystem"
Порридж В Ко-ливинге
Cuz idea is the same
Viktor
Does anybody have experience with functional languages? That's what I'd be interested in.
Viktor
There's a guy on Twitch who does streams on Haskell, looks like magic 🙂
Порридж В Ко-ливинге
Порридж В Ко-ливинге
Little
Порридж В Ко-ливинге
Порридж В Ко-ливинге
I am pro lisp programmer
Viktor
Hey, I told you that I have some)
Missed that, man 🙂 What's the language?
Порридж В Ко-ливинге
( (( (((( (((((( (((( ( (( () ))0) ) ) )
Порридж В Ко-ливинге
Viktor
nah, I mean functional language
Viktor
like lisp
Порридж В Ко-ливинге
Isn’t C functional?
Порридж В Ко-ливинге
Like, not OOP?
Viktor
( (( (((( (((((( (((( ( (( () ))0) ) ) )
you know what that say: some people see only parentheses, others see the pure logic 🙂
Viktor
I'm the first one.
Viktor
Isn’t C functional?
Nope, it allows imperative logic, moreover functions are not a first-class citizen in C, for instance JavaScript allows to write code in functional style (check out Ramda.js)
Viktor
Functional languages don't have anything except of pure functions and their combinations
Порридж В Ко-ливинге
Ow, seems like I don’t know whats functional
Viktor
You combine different functions to build data pipelines
Viktor
for instance, to walk down the array you always use map, reduce, etc
Viktor
you can't just use for-loop
Порридж В Ко-ливинге
Порридж В Ко-ливинге
Or C 🤣
Порридж В Ко-ливинге
Порридж В Ко-ливинге
Weird
Порридж В Ко-ливинге
Ok goto 🤣
Viktor
Check out this guy → https://www.youtube.com/watch?v=h_D4P-KRNKs
Порридж В Ко-ливинге
Viktor
Yeah, I like that 🙂
Порридж В Ко-ливинге
Check out this guy → https://www.youtube.com/watch?v=h_D4P-KRNKs
Look’s like a sport for a Pub (like pool or darts)
Порридж В Ко-ливинге
No sence but fun
Uladzimir
Какое дружественное комьюнити, не послали rtfm, а разжевали :)
Viktor
Котики, а не программисты.
Порридж В Ко-ливинге
Мне показалось, или наш друг писал что-то?
Порридж В Ко-ливинге
Т.к. у меня уведомления было
New
Hello
New
New
Why it prints 3 instead of 2
Yuri
because the increment happens after each loop of the for-loop
Anonymous
Hi guys, I wanted to join this group to discuss about problem solving
Anonymous
When you call the printNumTwo, it check in the local scope. Since I is not present in function. It climbs the ladder to the next level. Which is global. Where i is already 3