The Official Making Fun Of Programming Languages Thread
-
@gąska said in The Official Making Fun Of Programming Languages Thread:
@createdtodislikethis Rust has
Cow<T>
type that can wrap nearly any type to give it COW semantics.If this was ported to C++, would the type implement MOOve semantics?
I'm sorry--No I'm not
-
@mzh Your pun was better (worse?) than mine.
-
@createdtodislikethis said in The Official Making Fun Of Programming Languages Thread:
I wish some high-level languages tried copy-on-write value semantics for values types, where 'value types' includes strings
Strings are immutable in sane languages (which includes Java, C#, Python and more), making references and values equivalent.
@createdtodislikethis said in The Official Making Fun Of Programming Languages Thread:
arrays, dicts and anything else that's logically a value type.
Use Haskell, then.
Assuming you don't consider C++ high-level, so Qt does not qualify.
Actually, C++ used to do copy-on-write for
std::string
(in the original STL and early standard libraries). It was dropped, because it didn't work well with iterators (the compiler won't tell you whether iterator is dereferenced for reading or writing when writing is permitted).@gąska said in The Official Making Fun Of Programming Languages Thread:
@createdtodislikethis Rust has
Cow<T>
type that can wrap nearly any type to give it COW semantics.Yes, borrowing cows (
std::borrow::Cow
) is fun, but it does not actually have much to do with COW semantics. It only lets functions to implement them. Instant bovine powers can, however, be provided bystd::rc::Rc::make_mut
orstd::sync::Arc::make_mut
instead.
-
Y'all mock PHP for making SQL injection easier, but we've had prepared statements as a core feature for thirteen years.
We are even at the point where functions can declare incoming and outgoing types and that some unsafe type juggling at the scalar level will throw warnings.
It's like PHP recognised where they done fucked up and are actively fixing it.
-
@bb36e said in The Official Making Fun Of Programming Languages Thread:
they also have one for animals...you can guess what that one is named.
/r/Rule34Porn?
-
<obscure>
Asterisk:
Set(strVar="What if everything was a string/stringly type?");
WARNING[3833][C-000000f3]: ast_expr2.y:1497 op_div: non-numeric argument
</obscure>
-
@arantor said in The Official Making Fun Of Programming Languages Thread:
It's like PHP recognised where they done fucked up and are actively fixing it.
Ping me as soon as a PHP web application is (finally) a long-running background process. Because starting up an interpreter instance for every request is an insanity they still haven't fixed.
-
@asdf PHP-FPM operates a pool of interpreters... and came in with 5.3.3 and declared stable with 5.4.
-
@arantor said in The Official Making Fun Of Programming Languages Thread:
It's like PHP recognised where they done fucked up and are actively fixing it.
Too bad they can't actively fix the bad devs...
-
@createdtodislikethis said in The Official Making Fun Of Programming Languages Thread:
I wish some high-level languages tried copy-on-write value semantics for values types, where 'value types' includes strings, arrays, dicts and anything else that's logically a value type.
That's how Tcl has worked for close to 20 years.
-
@jaloopa said in The Official Making Fun Of Programming Languages Thread:
/r/Rule34Porn?
s|/r/xPorn|x|animal
-
@bb36e the fuck is this syntax?
-
@gąska oh good, I'm not the only one. I just assumed it was standard unreadable regex
-
@dcon said in The Official Making Fun Of Programming Languages Thread:
@arantor said in The Official Making Fun Of Programming Languages Thread:
It's like PHP recognised where they done fucked up and are actively fixing it.
Too bad they can't actively fix the bad devs...
Indeed, but the amount of warnings that software is beginning to emit, they're going to have to learn to fix it.
-
@gąska said in The Official Making Fun Of Programming Languages Thread:
@bb36e the fuck is this syntax?
Oh wait, I got that completely wrong, didn't I? :|
-
-
@dkf the Go one isn't even a joke - that's what they marketed the language as at the very beginning.
-
@ben_lubar The best jokes are the ones that have lots of truth in them.
-
@arantor said in The Official Making Fun Of Programming Languages Thread:
@dcon said in The Official Making Fun Of Programming Languages Thread:
@arantor said in The Official Making Fun Of Programming Languages Thread:
It's like PHP recognised where they done fucked up and are actively fixing it.
Too bad they can't actively fix the bad devs...
Indeed, but the amount of warnings that software is beginning to emit, they're going to have to learn to fix it.
php --f-no-warn
?
-
@dreikin
php -d error_reporting=0 -f myfile.php
but otherwise, yes.