Click here to Skip to main content
15,889,867 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.

 
GeneralRe: Readable code, taken too far (too Swift)? Pin
André Pereira25-Nov-18 23:31
André Pereira25-Nov-18 23:31 
GeneralRe: Readable code, taken too far (too Swift)? Pin
Lutosław26-Nov-18 1:00
Lutosław26-Nov-18 1:00 
GeneralRe: Readable code, taken too far (too Swift)? Pin
André Pereira26-Nov-18 3:58
André Pereira26-Nov-18 3:58 
GeneralRe: Readable code, taken too far (too Swift)? Pin
Lutosław25-Dec-18 1:55
Lutosław25-Dec-18 1:55 
GeneralRe: Readable code, taken too far (too Swift)? Pin
Rob Grainger7-Jan-19 2:21
Rob Grainger7-Jan-19 2:21 
GeneralRe: Readable code, taken too far (too Swift)? Pin
Rob Grainger3-Dec-18 5:54
Rob Grainger3-Dec-18 5:54 
GeneralRe: Readable code, taken too far (too Swift)? Pin
raddevus3-Dec-18 7:46
mvaraddevus3-Dec-18 7:46 
GeneralRe: Readable code, taken too far (too Swift)? Pin
Ryan Peden7-Jan-19 1:37
professionalRyan Peden7-Jan-19 1:37 
I suppose it helps Swift code read more like Objective-C code.

That's important in this context, because Objective-C basically grafted Smalltalk's object system onto C. And so ObjC's object syntax ended up being very Smalltalk-like.

I really enjoyed it in Smalltalk. I felt that it made for very readable, understandable code. It didn't work as well and ObjC because there was a huge clash between the C syntax and the Smalltalk syntax.

At first, I disliked this syntax in Swift. But in the end, I decided it was just one of those things that I disliked because it was different than what I was used to. After a while, I didn't mind it so much.

I find it a lot uglier in Swift than in Smalltalk, however, since in Smalltalk you don't use brackets when sending a message to an object. The Smalltalk debugging environment is also way more fun. Test driven development is fun in Smalltalk, because if you write a test that calls a method that doesn't exist yet, it's no problem. The Smalltalk debugger will yell at you, pause execution, and then give you an opportunity to implement the method before resuming execution.

Like many things in life, though, it's definitely a matter of taste and opinion. Some people will never like this aspect of Swift, and I think it's completely fine for them to feel that way. Smile | :)
GeneralRe: Readable code, taken too far (too Swift)? Pin
raddevus7-Jan-19 1:54
mvaraddevus7-Jan-19 1:54 
GeneralRe: Readable code, taken too far (too Swift)? Pin
KarstenK1-Jan-19 23:28
mveKarstenK1-Jan-19 23:28 
GeneralRe: Readable code, taken too far (too Swift)? Pin
raddevus2-Jan-19 5:17
mvaraddevus2-Jan-19 5:17 
GeneralRe: Readable code, taken too far (too Swift)? Pin
KarstenK6-Jan-19 20:03
mveKarstenK6-Jan-19 20:03 
GeneralRe: Readable code, taken too far (too Swift)? Pin
raddevus7-Jan-19 1:56
mvaraddevus7-Jan-19 1:56 
GeneralRe: Readable code, taken too far (too Swift)? Pin
Ravi Bhavnani21-Jan-19 5:06
professionalRavi Bhavnani21-Jan-19 5:06 
GeneralRe: Readable code, taken too far (too Swift)? Pin
raddevus21-Jan-19 5:12
mvaraddevus21-Jan-19 5:12 
GeneralRe: Readable code, taken too far (too Swift)? Pin
Ravi Bhavnani21-Jan-19 6:26
professionalRavi Bhavnani21-Jan-19 6:26 
GeneralRe: Readable code, taken too far (too Swift)? Pin
raddevus21-Jan-19 7:31
mvaraddevus21-Jan-19 7:31 
GeneralRe: Readable code, taken too far (too Swift)? Pin
Ravi Bhavnani21-Jan-19 9:11
professionalRavi Bhavnani21-Jan-19 9:11 
GeneralRe: Readable code, taken too far (too Swift)? Pin
Dr.Walt Fair, PE7-May-19 5:46
professionalDr.Walt Fair, PE7-May-19 5:46 
Generalpersonal worst... Pin
DerekT-P19-Nov-18 7:07
professionalDerekT-P19-Nov-18 7:07 
GeneralRe: personal worst... PinPopular
raddevus19-Nov-18 7:56
mvaraddevus19-Nov-18 7:56 
GeneralRe: personal worst... Pin
RickZeeland19-Nov-18 8:02
mveRickZeeland19-Nov-18 8:02 
GeneralRe: personal worst... Pin
charlieg19-Nov-18 17:06
charlieg19-Nov-18 17:06 
GeneralRe: personal worst... Pin
Daniel Pfeffer19-Nov-18 19:57
professionalDaniel Pfeffer19-Nov-18 19:57 
GeneralRe: personal worst... Pin
RickZeeland19-Nov-18 23:55
mveRickZeeland19-Nov-18 23:55 

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.