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.
 
  • Locked thread
power botton
Nov 2, 2011

Johnny Cache Hit posted:

adult programmers

no such thing

Adbot
ADBOT LOVES YOU

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

gucci void main posted:

go fmt is cool but unfortunately go has the ugliest syntax of just about any language ever designed so no level of formatting can truly help it

lol

C++, java/c#, Erlang, lisp

Johnny Cache Hit
Oct 17, 2011

gucci void main posted:

go has the ugliest syntax of just about any language ever designed

what

now i want to know what language you think has the prettiest syntax

Shaggar
Apr 26, 2006
I don't think I remember go syntax, but I cant imagine its worse than perl

Johnny Cache Hit
Oct 17, 2011
face me sulk

i want to mock whatever language you say has the prettiest syntax

Doc Block
Apr 15, 2003
Fun Shoe
Do people actually use Go yet, or is it still Yet Another Google Project that Linux nerds are going gaga over because Ken Thompson or whoever is/was involved?

power botton
Nov 2, 2011

Doc Block posted:

Do people actually use Go yet, or is it still Yet Another Google Project that Linux nerds are going gaga over because Ken Thompson or whoever is/was involved?

people love to claim that google is using it for serious infrastructure and services internally

power botton
Nov 2, 2011

http://golang.org/doc/faq#Is_Google_using_go_internally

It does the insane job of serving chrome binaries.

Nomnom Cookie
Aug 30, 2009



a custom server written in a custom language, to serve files from a custom filesystem over http. google is the most nih place in the universe

Shaggar
Apr 26, 2006

Doc Block posted:

Do people actually use Go yet, or is it still Yet Another Google Project that Linux nerds are going gaga over because Ken Thompson or whoever is/was involved?

pretty sure its already abandoned.

men with puns
Feb 8, 2010
Young Orc

Nomnom Cookie posted:

a custom server written in a custom language, to serve files from a custom filesystem over http. google is the most nih place in the universe

if you're using their browser, they'll talk to it using SPDY instead of http

double sulk
Jul 2, 2010

Johnny Cache Hit posted:

what

now i want to know what language you think has the prettiest syntax

elixir or c#

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i like haskell

gonadic io
Feb 16, 2011

>>=
gotta say, using spaces for function application seems nicer than any other alternative i've seen. plus it lets you use partial application really easily to do stuff like

code:
> imapM_ (printf "%d %s\n") ["foo", "bar", "baz"]
0 foo
1 bar
2 baz

MononcQc
May 29, 2007

Elixir's spaces for function application, combined with its eager evaluation, and its use of different namespaces for closures and literal functions can be confusing. I wouldn't consider it to have a neat syntax, or at the very least, not the best semantics around so far.

So for example, the pipe operator (|>) allows to transform something like f(g(a,1),2,3) into a |> g(1) |> f(2,3), or with spaces: a |> g 1 |> f 2,3 . That's fine. Now if g is instead a closure, then it works a bit like lisps-2 and you need a different syntax: f(g.(a,1),2,3), and a |> g.(1) |> f 2,3 (closures do not allow the parens-less calling syntax).

Similarly to standard lisp-2 shenanigans, you can have both g() and g.() calls happening and referring to two different functions within the same scope. The former refers to the literal 'g' function, while the latter refers to the closure within the 'g' variable.

Here's where it gets fun with spaces for function application. Let's say I use this g combo and use it in an expression such as g |> something(x). It isn't clear whether I just called g() and passed its result to something(_, x), or if I passed in the variable itself.

Then the |> macro has problems of its own, namely that it's impossible to call a function and use its result in a pipe sequence: g |> (f()) isn't valid as far as I know.

Elixir has nice-looking syntax, but warts hiding around it, and you have to be careful about it. I remember finding a bug with its pattern matching assignment/reassignment where poo poo was left unspecified:


x = 3
{x, ^x} = {5,5}


It was undefined whether the pattern matching would take place left-to-right or not, and whether the re-assignment of 'x' would take place before its fixed matching on a previous value (^x). In one case the expression works, in the other, it fails and errors out. I think this has now been specified into the language, but you just know there's plenty of that stuff lurking in.

I know I would instantly remove the parens-free calls given how confusing it is in Elixir.


E: just asked José Valim. The variable is always prefered in g |> f, and nullary function calls will only happen if there is no scope ambiguity.

MononcQc fucked around with this message at 15:57 on Jan 9, 2014

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news

Johnny Cache Hit posted:

what

now i want to know what language you think has the prettiest syntax

c# syntax is pretty loving great

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

FamDav
Mar 29, 2008
elixir blows erlang blows your mom blows

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Mr SuperAwesome posted:

c# syntax is pretty loving great

shaggar was right

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

~Coxy posted:

shaggar was right

Dr Monkeysee
Oct 11, 2002

just a fox like a hundred thousand others
Nap Ghost

Mr SuperAwesome posted:

c# syntax is pretty loving great

seriously c# is really pretty when written well

oddly java has almost the same syntax but it's different enough some mental block kicks in and my eyes slide right the gently caress off the screen. i literally can't pay attention to a java code review

in summation the line between beauty and the grotesque is thin

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news
ye i agree gently caress java lol

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Monkeyseesaw posted:

seriously c# is really pretty when written well

oddly java has almost the same syntax but it's different enough some mental block kicks in and my eyes slide right the gently caress off the screen. i literally can't pay attention to a java code review

in summation the line between beauty and the grotesque is thin

f# is basically a nicer c# in every way possible

Shaggar
Apr 26, 2006
java and c# are pretty much the same, but VS defaults to all man style so that's why c# code looks better by default

Shaggar
Apr 26, 2006
also, properties

Posting Principle
Dec 10, 2011

by Ralp
realtalk why cant i just do something like

code:
@Property int butts;
in java

Shaggar
Apr 26, 2006
that's not really any different from private int butts; or public int butts;

what you really want is public int Butts { get; set; }

SavageMessiah
Jan 28, 2009

Emotionally drained and spookified

Toilet Rascal
Java code:
@Data
class Butts {
  private int stinkyness;
}

class Butts {
  @Getter @Setter
  private int stinkyness;
}
works with lombok

lombok rules

EDIT: to be clear it generates appropriate bean methods. if its final it only does the getter.

Shaggar
Apr 26, 2006
that's all pretty gross compared 2 c# properties.

SavageMessiah
Jan 28, 2009

Emotionally drained and spookified

Toilet Rascal

Shaggar posted:

that's all pretty gross compared 2 c# properties.

yes

but ill take what i can get

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Shaggar posted:

that's all pretty gross compared 2 c# properties.

Sorry shaggar, but lombok loving rules when you're making stupid little bean classes that are really just structs. It adds the getters, setters, constructors, equals, hashcode and toString all for you with that one annotation.

Posting Principle
Dec 10, 2011

by Ralp

Hard NOP Life posted:

Sorry shaggar, but lombok loving rules when you're making stupid little bean classes that are really just structs. It adds the getters, setters, constructors, equals, hashcode and toString all for you with that one annotation.

lombok looks pretty cool. how does that sort of stuff work in java, is it doing the work at compile time, or using reflection/proxies?

GameCube
Nov 21, 2006

yo check it there's a sales on computer books about computers http://www.amazon.com/s/ref=amb_lin...rd_i=7299114011

can someone who knows about this poo poo tell me if there's a referral in that link cuz someone sent it out to the whole engineering dept and now i wonder if he's making mad bucks off of us

Shaggar
Apr 26, 2006
it does it during compilation so the compiled code is as if you wrote the getters/setters/etc.. you're self. I don't like the smell of it.

Posting Principle
Dec 10, 2011

by Ralp
thats really cool then. i might use it

Posting Principle
Dec 10, 2011

by Ralp
actually i'm going to look at the code for it to see how it works, because that is more interesting than using it really.

Shaggar
Apr 26, 2006
like that's something i'd rather have the ide do for me in realtime. eclipse can already generate that stuff for you, but you have to tell it to manually. so if you could flag a class somehow so eclipse auto generated stuff when you made changes to fields that would be better. that way you're checking in the real code which would be way easier for people who don't know about whatever special compiler thing ur using.

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
y do u bother with getter and setter methods if there's no logic in them u could just use the public field directly

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i like haskell guards a lot

code:
	max :: Ord a => a -> a -> a
	max x y
	  | x > y = x
	  | otherwise = y

Adbot
ADBOT LOVES YOU

MeruFM
Jul 27, 2010
C# is kinda nice in some ways but using getset syntactic sugar as the reason is p bad

  • Locked thread