Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Gazpacho posted:

Perhaps a political analogy will help. If we place abstract on
the left and concrete on the right, Haskell is Marxism. Lisp is
liberal democracy. Watt is fascism - pure raw power. There is
no delicate lambda calculus - only Nock, the naked rifle butt.
Watt has functions and types, or what appear to be functions and
types. On closer inspection, they are not abstractions at all,
just glorified Nock macros.

Obama was born in Kenya

Adbot
ADBOT LOVES YOU

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
dbus does what nintendont

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Tiny Bug Child posted:

lol i'm a lowly php dev and i immediately knew what (*s++ = *t++) meant. lol at elitist c people who pretend pointers are this huge intractable mystery and not a simple but hacky concept that should rarely be used

you're really suggesting that people who are C experts actually thing pointers are an "intractable mystery"? ahahahahah

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
i'm a C expert but this concept of pointing.. at memory... eludes me

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Tiny Bug Child posted:

of course not you dingus. obviously they know there's nothing to it, they just treat it like a huge deal to scare off real devs

that is completely false. it's uninformed morons like you who hype it up

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Tiny Bug Child posted:

real languages automatically use pass by reference so programmers don't have to worry about it.

nah, actually they pass references by value.

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Suspicious Dish posted:

oh cool time to debate what "pass by reference" means

Is a debate where uninformed people give their opinions on a factual topic?

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

tef posted:

http://dl.acm.org/citation.cfm?id=1480881.1480908

"... In PHP, assignment to variables copies the assigned values, according to its so-called copy-on-assignment semantics. In contrast, a typical PHP implementation uses a copy-on-write scheme to reduce the copy overhead by delaying copies as much as possible.

This leads us to ask if the semantics and implementation of PHP coincide, and actually this is not the case in the presence of sharings within values...."

poor sods

Php is an onion of failure

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
turns out tef is still cool that's good

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
Just become project tech lead and tell your reports they're wrong

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
ahhhhh that motherfuckers facial hair

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

tef posted:

Java code:
import java.net.*                                          ;
import java.io.*                                           ;
import java.util.*                                         ;
public class Server                                        { 
    public static void main( String[] args)                {
        try                                                {
            ServerSocket sock = new ServerSocket(4712,100) ;
            while(true) new Handler(sock.accept()).start() ;}
        catch(IOException e)                               {
            System.err.println(e)                          ;};}} 
 
class Handler extends Thread                               {
    public void run()                                      {
        Random random=new Random()                         ;
        try                                                {
            //yada yada yada
        catch(Exception e)                                 {
            System.err.println(e)                          ;};}}

now thats what i call coffeescript

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
rust seems cool

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
seems more useful than haskell

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Mr Dog posted:

I do enjoy the fact that Vala of all languages actually gets NULL handling right (i.e. you have to opt in to nullability for everything and explicitly test for it if something is nullable)

java.util.Optional is a decent retrofit compromise for the best programming language though

lmfao at this article title http://www.oracle.com/technetwork/articles/java/java8-optional-2175753.html

god java is stupid

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
his demonstration of "optional" is loving insane lmfao. how is that an acceptable retrofit

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
he gives much better examples implemented by other languages that use the JVM and then presents Optional and it's clear that it's just a stupid pile of poo poo for retards

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
Java code:
String version = computer?.getSoundcard()?.getUSB()?.getVersion();
vs

Java code:
String version = computer.flatMap(Computer::getSoundcard)
                   .flatMap(Soundcard::getUSB)
                   .map(USB::getVersion)
                   .orElse("UNKNOWN");
Java programmers must be too stupid to realize how terrible their lives are or they would all have committed suicide by now

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Bloody posted:

right, that makes sense. I guess I don't get the "mark everything private and give it a getter and setter" thing that seems to be popular.

so when you inevitably have bugs caused by poo poo just mutating parts of an object using the getters and setters you can set breakpoints on the getters and setters, oblivious to the larger design problems in Hyderabad Hustler 2015

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

pseudorandom name posted:

future proofing against the hypothetical scenario where you replace or remove the private variable

also the setter allows you to validate inputs because your type system doesn't automatically restrict you to sanity

what are you talking about.

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Max Facetime posted:

like you have a Person class with a name String, and in the far future our names will be generated from ID numbers assigned by a computer but thanks to wrapping the name String behind a getName method call your code is well-prepared for this scenario!

lmao

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Mr Dog posted:

that example article is loving terrible in all sorts of ways

also who gives a poo poo about getters/setters, you know you can just have your data member poo poo public and you're not going to get hanged by the Inquisition right

sometimes a struct is just a struct. other times validating data might be a good idea idk it seems to me like an object should always enforce its own validity so a setter would be a good place to perform validation.

c# properties are not that offensive but not a particularly good idea either imo. you inevitably get dipshits who do something not-thread-safe or mutating or not-idempotent in a c# getter. just like how they blindly c&p'ed java to make c# 1.0 and then bolted their own redundant poo poo on top like having both Equals() and an operator== overload and expressing one in terms of the other is a loving pain in the dick. does x == y test logical equality? identity??? who the gently caress knows???????

Alt-poo poo-S, R to bring up the autogenerate dialog, Alt-A to select everything, Enter, there, now you have a bunch of accessors. now stop being a loving baby. sometimes being clear about what's going on is worth a few extra (automated) keystrokes.

really all that this demonstrates is that, once again, stupid bad programmers try to use Java and then blame Java for their own lovely ineptitude, and that Java is the best programming language for most jobs performed by adults who perform useful labour. the existence of plangs to draw off insecure children who have something to prove is something i am thankful for every day.

do you have a better way to use Optional

Adbot
ADBOT LOVES YOU

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

tef posted:

surprise: it's game dev code :toot:

you mean people will actually run it?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply