|
If it’s the “walrus” operator it should be :3=
|
# ? Jun 9, 2021 06:10 |
|
|
# ? Jun 7, 2024 21:58 |
|
what’s the walrus operator
|
# ? Jun 9, 2021 06:13 |
|
fart simpson posted:what’s the walrus operator := (duh)
|
# ? Jun 9, 2021 06:18 |
|
fart simpson posted:what’s the walrus operator assignment expression (x := 3) returns the value of x when it resolves.
|
# ? Jun 9, 2021 06:21 |
|
so it’s just a way to do variable assignment as an expression rather than as a statement?
|
# ? Jun 9, 2021 06:26 |
|
fart simpson posted:so it’s just a way to do variable assignment as an expression rather than as a statement? Yes. It's more useful in languages with strong scoping, but it lets you eliminate some nested ifs so I think it's nice, but most of the time in python it just highlights some tortured logic that needs refactoring anyway.
|
# ? Jun 9, 2021 06:37 |
|
MrQueasy posted:Yes. It’s great for return statements. Python code:
Python code:
|
# ? Jun 9, 2021 06:49 |
|
Corla Plankun posted:anyone have a good reference handy for C# parallelism/coroutines/whatever-the-gently caress for programmers that already understand the concepts and are just trying to figure out what the specific implementations look like in c#? if you mean parallelism in general, the magic words are task parallel library https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/task-based-asynchronous-programming
|
# ? Jun 9, 2021 06:55 |
|
No Pants posted:if you mean parallelism in general, the magic words are task parallel library this looks extremely good, thank you! I'll check it out tomorrow when I'm on the clock
|
# ? Jun 9, 2021 07:52 |
|
MrQueasy posted:public interface EnumerableAssert<SELF extends EnumerableAssert<SELF, ELEMENT>, ELEMENT> { I just stumbled upon this at work: code:
(tbf, they documented it)
|
# ? Jun 9, 2021 11:15 |
|
MrQueasy posted:assignment expression i like assignment expression but I hate ‘walrus operator’
|
# ? Jun 9, 2021 12:29 |
|
go does a lot of things wrong but assignment expression and the way it handles shadowing aren’t two of them
|
# ? Jun 9, 2021 12:30 |
|
in haskell basically everything is an expression, there are no statements
|
# ? Jun 9, 2021 12:37 |
|
Why don't you marry Haskell if you love it so much
|
# ? Jun 9, 2021 12:55 |
|
Fart Simpson | Haskell Look the perfect Union
|
# ? Jun 9, 2021 12:56 |
|
:= is the chode operator
|
# ? Jun 9, 2021 13:00 |
|
Armitag3 posted:Why don't you marry Haskell if you love it so much maybe i will. thanks for the idea
|
# ? Jun 9, 2021 13:00 |
|
Armitag3 posted:Why don't you marry Haskell if you love it so much don’t think op is their type
|
# ? Jun 9, 2021 13:27 |
|
Boiled Water posted:don’t think op is their type
|
# ? Jun 9, 2021 13:59 |
|
Boiled Water posted:don’t think op is their type lmao
|
# ? Jun 9, 2021 14:00 |
|
Boiled Water posted:don’t think op is their type lol
|
# ? Jun 9, 2021 14:30 |
|
Armitag3 posted:Why don't you marry Haskell if you love it so much
|
# ? Jun 9, 2021 14:48 |
|
Boiled Water posted:don’t think op is their type
|
# ? Jun 9, 2021 16:20 |
|
Boiled Water posted:don’t think op is their type
|
# ? Jun 9, 2021 16:27 |
|
Boiled Water posted:don’t think op is their type
|
# ? Jun 9, 2021 17:35 |
|
Boiled Water posted:don’t think op is their type lol
|
# ? Jun 9, 2021 17:36 |
|
Ocean of Milk posted:I just stumbled upon this at work: The Generics abuse by the AssertJ is nothing short of miraculous. It’s only tolerable/usable because their documentation practice is one of the best I’ve seen in Java land. And it keeps them from having to use reflection/bytecode shenanigans more than they already do.
|
# ? Jun 9, 2021 18:15 |
|
Brain Candy posted:you'll never convince me that IFoo indicating that Foo is an interface is anything other than MS brain damage, sorry better than Foo/FooImpl imo
|
# ? Jun 9, 2021 19:31 |
|
raminasi posted:better than Foo/FooImpl imo Disagree because identifiers following the latter convention sort better
|
# ? Jun 9, 2021 19:48 |
|
Sapozhnik posted:Disagree because identifiers following the latter convention sort better Look at this doofus not putting all his interfaces into a completely separate module so the sorting is hosed up no matter what you do.
|
# ? Jun 9, 2021 19:51 |
|
god loving dammit guys shut up about variable names
|
# ? Jun 9, 2021 22:21 |
|
Corla Plankun posted:stop using hungarian notation you shitstains
|
# ? Jun 9, 2021 22:23 |
|
ok how about this https://pythonspeed.com/articles/faster-python/ so regular libc is faster than musl at the expense of size however the flags you pass to build python can potentially impact performance up to 20% i have a small project to attempt to fuzz the builds but it seems like a really stupid way to try and find other optimizations
|
# ? Jun 9, 2021 23:16 |
|
Corla Plankun posted:god loving dammit guys shut up about variable names
|
# ? Jun 9, 2021 23:17 |
|
C++20 has the UFO operator <=>
|
# ? Jun 9, 2021 23:42 |
|
I think ruby calls that the spaceship operator. but ruby also has flip flop operators so probably best not to follow ruby's lead also I like the "wtf is that" feeling conveyed by "ufo"
|
# ? Jun 9, 2021 23:47 |
|
unidentified fuckup operator
|
# ? Jun 9, 2021 23:51 |
|
ur hosed, op
|
# ? Jun 10, 2021 00:01 |
|
you can always use git blame to identify the fuckup
|
# ? Jun 10, 2021 00:06 |
|
|
# ? Jun 7, 2024 21:58 |
|
Presto posted:C++20 has the UFO operator <=> Amateur hour. Haskell has an owl combinator that looks like a topless woman wearing a necklace. ((.)$(.))
|
# ? Jun 10, 2021 00:12 |