Click here to Skip to main content
14,549,467 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralClient sided login Pin
Brisingr Aerowing25-May-20 12:42
professionalBrisingr Aerowing25-May-20 12:42 
GeneralRe: Client sided login Pin
lw@zi 25-May-20 18:34
professional lw@zi 25-May-20 18:34 
GeneralRe: Client sided login Pin
Sander Rossel25-May-20 19:59
professionalSander Rossel25-May-20 19:59 
GeneralRe: Client sided login Pin
lw@zi 26-May-20 21:29
professional lw@zi 26-May-20 21:29 
GeneralRe: Client sided login Pin
Sander Rossel26-May-20 21:51
professionalSander Rossel26-May-20 21:51 
GeneralRe: Client sided login Pin
DerekT-P28-May-20 6:33
professionalDerekT-P28-May-20 6:33 
GeneralRe: Client sided login Pin
lw@zi 30-May-20 0:36
professional lw@zi 30-May-20 0:36 
GeneralRe: Client sided login Pin
DerekT-P30-May-20 2:18
professionalDerekT-P30-May-20 2:18 
GeneralRe: Client sided login Pin
Kornfeld Eliyahu Peter25-May-20 20:24
mveKornfeld Eliyahu Peter25-May-20 20:24 
GeneralRe: Client sided login Pin
F-ES Sitecore25-May-20 23:49
mveF-ES Sitecore25-May-20 23:49 
GeneralRe: Client sided login Pin
phil.o28-May-20 8:22
mvephil.o28-May-20 8:22 
GeneralRe: Client sided login Pin
lw@zi 2-Jun-20 21:37
professional lw@zi 2-Jun-20 21:37 
GeneralRe: Client sided login Pin
kmoorevs29-May-20 11:27
Memberkmoorevs29-May-20 11:27 
QuestionWhat's the Most Concise, Human-Understandable Practical Language? Pin
johnywhy13-May-20 21:39
Memberjohnywhy13-May-20 21:39 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Member 1330167917-May-20 20:47
MemberMember 1330167917-May-20 20:47 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Rob Grainger21-May-20 23:11
MemberRob Grainger21-May-20 23:11 
RantRe: What's the Most Concise, Human-Understandable Practical Language? PinPopular
Member 1456470917-May-20 20:49
MemberMember 1456470917-May-20 20:49 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Leo5617-May-20 21:36
MemberLeo5617-May-20 21:36 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Steve Naidamast18-May-20 2:50
professionalSteve Naidamast18-May-20 2:50 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Jalapeno Bob22-May-20 9:22
professionalJalapeno Bob22-May-20 9:22 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Fred283417-May-20 20:51
MemberFred283417-May-20 20:51 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
lopatir17-May-20 20:52
Memberlopatir17-May-20 20:52 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Lorenzo Bertolino17-May-20 20:59
professionalLorenzo Bertolino17-May-20 20:59 
It won't be the most concise, human-understandable and practical language but Dart sure is very concise, for a statically typed language, dropping a lot of the oop cruft that languages such as c# or java have

abstract class Item {
  use();
}

class Chest<T> implements Item {
  List<T> contents;

  Chest(this.contents);

  use() => print("$this has ${contents.length} items.");
}

class Sword implements Item {
  int damage = 5;

  use() => print("$this dealt $damage damage.");
}

main(){
  var chest = Chest([Sword()]);

  chest.use();

  for (var item in chest.contents) {
    item.use();
  }
}

It drops public and private in favor of using "_" before private instance variables, doesn't require the new keyword, has a very concise (and imo clear) function definition style and a constructor definition that can't be made slimmer without impacting heavily on understandability.

Regarding
| Notice the lack of punctuation. Notice judicious use of whitespace as syntax.
(how do you quote text? Smile | :) )
Yeah, no, as you can see there is a lot of punctuation and whitespace is basically meaningless

For the practicality of this language... outside of Flutter, not much, honestly.
I find it to be very neat but it isn't going to replace js any time soon

Edit: the code is taken more or less literally from the examples on dart.dev

modified 18-May-20 3:09am.

AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Richard Deeming18-May-20 1:28
mveRichard Deeming18-May-20 1:28 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
KateAshman17-May-20 21:57
MemberKateAshman17-May-20 21:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.