Ho dear!!! - Page 1
Forum section: electronics / general

author: Lesterwyatt
author_rank: Regular Contributor
timestamp: March 12, 2015, 10:25:05 am
content: Just spent the last couple of days writing a sketch for a Arduino project.And guess what!!Yes i never saved and laptop battery died. My Ubuntu os does not prompt me on this!!Booted back up and all my hard work gone! Well pissed off.Anyone else had this happen to them?Lester

author: dr.diesel
author_rank: Super Contributor
timestamp: March 12, 2015, 10:26:56 am
content: I'm very sorry to hear, but you waiting days before saving?

author: leppie
author_rank: Frequent Contributor
timestamp: March 12, 2015, 10:39:01 am
content: This has been silly behavior since the beginning. Never know why they have not fixed it.Look in your temp directory for a saved copy perhaps.

author: Unknown
author_rank: Unknown
timestamp: March 12, 2015, 10:39:09 am
content: Should have gone with Windows ;-) At least it warns you and by default suspends if you ignore the warnings. As a last ditch effort you might have got your stuff back from the swap file.In all seriousness, I feel your pain. I once lost gigabytes of data after I locked myself out of an encrypted volume. The password was stored in a KeePass file inside the volume which I didn't have access to; catch-22. I'll never make that mistake again!

author: cyr
author_rank: Frequent Contributor
timestamp: March 12, 2015, 10:54:11 am
content: My ubuntu laptops auto-suspend at low battery no problem...But seriously, days of work without saving the file?You have no-one to blame but yourself.Save early, save often, use version control, back up everything.

author: AndyC_772
author_rank: Super Contributor
timestamp: March 12, 2015, 10:56:51 am
content: This kind of thing never happens to the same person twice. Treat the experience as your induction into the world of engineering.If you don't already have a system of regular automated backups, then take this as an opportunity to learn from other peoples' mistakes as well as your own, and get that sortedright nowas well. "I lost a file and didn't have a backup" is pretty much guaranteed to be the next plaintive cry, and it too will receive little or no sympathy.

author: Kjelt
author_rank: Super Contributor
timestamp: March 12, 2015, 11:05:30 am
content: No not with coding, anything I write or code i press CTRL-S at least every couple of minutes.But with writing a long post on a forum like this one it happened to me more than I like, you post and you get a server error.If you go back sometimes you can find your posting but if the server is down a 404 or something makes for a bad bad day.

author: Unknown
author_rank: Unknown
timestamp: March 12, 2015, 11:05:42 am
content: Speaking of backups, I regularly backup to LTO2 tape (old I know, but it does the job). Beats burning hundreds of DVD's. Can be done on the cheap but reliable.

author: Lesterwyatt
author_rank: Regular Contributor
timestamp: March 12, 2015, 11:08:48 am
content: Ubuntu is a stable platform and I very rairly shutdown.I do have laptop plugged into mains while I'm working, however when I'mFinished I'll shut lid and unplug (don't like to leave charging overnight unattended).However this time I forgot to plug back it when I started using.And BAM! Data lost.

author: rollatorwieltje
author_rank: Unknown
timestamp: March 12, 2015, 11:09:20 am
content: How can you go without saving fordays?! ctrl+s should be muscle memory when using a computer... Some editor kept track of the number of saves (maybe Eclipse? Can't remember), some files I saved hundreds of times a day. Basically ctrl+s on every line.

author: Unknown
author_rank: Unknown
timestamp: March 12, 2015, 11:14:49 am
content: Quote from: Lesterwyatt on March 12, 2015, 11:08:48 amIf you have a reputable brand system with a genuine battery and charger you shouldn't have any problems.Lithium Ion and Lithium Polymer batteries actually prefer short, more frequent charges. They don't like to be run flat. There is nothing wrong with keeping them plugged in for prolonged periods as the charging circuit takes care of it.

author: dannyf
author_rank: Super Contributor
timestamp: March 12, 2015, 11:18:35 am
content: QuoteI'm so poor that I cannot afford to use those free stuff.

author: M. András
author_rank: Super Contributor
timestamp: March 12, 2015, 11:28:45 am
content: my asus laptop is plugged into its charger 24/7 since i bought it 4 years ago, its a delta made 150W power brick, gets warm but has no other problem, so unless you are using some substandard chinese 2 bucks charger for your laptop i think its safe to leave it plugged in

author: mcinque
author_rank: Unknown
timestamp: March 12, 2015, 12:27:31 pm
content: There are two kinds of programmers: those who save their work every 5 minutes, and those thatstilldoesn't do it.

author: free_electron
author_rank: Super Contributor
timestamp: March 12, 2015, 02:27:56 pm
content: it is 2015. there should be no more need to save files. software should perform data snapshots every few seconds. kind of like having a journaling filesystem.Rolling back and forward in time should be flawless and painless. there would be no need for version control as it would be built into to operating system.instead , effort is wasted on making a new version of flatulent flamingo or babbling baboon. or whatever 'os du jour' ... just so we can have more holy wears over what color scheme and text editor we are using.

author: kolonelkadat
author_rank: Regular Contributor
timestamp: March 12, 2015, 02:31:40 pm
content: how can you write days of code without at the very least checking every so often that the code compiles?

author: Mechanical Menace
author_rank: Super Contributor
timestamp: March 12, 2015, 03:07:43 pm
content: Doesn't the Arduino IDE have an autosave? Even a bog standard text editor like gedit has an autosave feature and that's purposely minimal.Quote from: kolonelkadat on March 12, 2015, 02:31:40 pm+1

author: Lesterwyatt
author_rank: Regular Contributor
timestamp: March 12, 2015, 03:09:47 pm
content: Quote from: kolonelkadat on March 12, 2015, 02:31:40 pm. I did check that it complied (loads of times) anyhow I have lost all my code and that's that.That was my thought has the laptop went down that it should be fine, but it's gone. I will check temp folder later after work.

author: Kjelt
author_rank: Super Contributor
timestamp: March 12, 2015, 03:11:40 pm
content: Quote from: free_electron on March 12, 2015, 02:27:56 pm+1My MS Word has a better spelling checker and indicator where and what mistake I made than my compilers that throw 1000 errors because i forgot one lousy ; in a header fileIt is 2015 I want to see: bogus.h line 228 missing ;instead of 1000 errors for each and every c file including that header file

author: zapta
author_rank: Super Contributor
timestamp: March 12, 2015, 03:21:41 pm
content: Quote from: free_electron on March 12, 2015, 02:27:56 pmWill the OS also review changes, add descriptions, resolve conflicts and cross references to the bug system and ignore local experiment?Version control > backup.The Arduino IDE should have a save-files-on-compile option.

author: Mechanical Menace
author_rank: Super Contributor
timestamp: March 12, 2015, 03:25:32 pm
content: Quote from: Lesterwyatt on March 12, 2015, 03:09:47 pmYou should have the last version you compiled then. Can't compile some source without saving it

author: Fsck
author_rank: Super Contributor
timestamp: March 12, 2015, 03:32:14 pm
content: Quote from: free_electron on March 12, 2015, 02:27:56 pmkeep dreaming. that is far too optimal of a solution to be accepted by the world.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: March 12, 2015, 03:35:28 pm
content: Quote from: free_electron on March 12, 2015, 02:27:56 pmWell said.Backups are necessary. Anyone who has been using computers long knows this. They also know that all failures are painful, since the most recent non-corrupted backup is always older than one would like. Whether that is 5 minutes or 5 weeks. The flash of unreplaceable brilliance always occurred in the lost time.

author: Vgkid
author_rank: Super Contributor
timestamp: March 12, 2015, 04:28:30 pm
content: I use JGrasp, and it propmts to name/autosaves when it compiles.

author: free_electron
author_rank: Super Contributor
timestamp: March 12, 2015, 05:07:55 pm
content: Quote from: Kjelt on March 12, 2015, 03:11:40 pmThat's another one of my gripes. The bloody compiler can tell me exactly what is missing and where it is missing. WELL ? WHY DOESN'T IT PUT IT THERE !%$#%^&& C language. C for Crap.That's why i love VB and its code editor- forgot to close the parenthesis on a string ? VB puts it there.- forgot the 'next' ia for ? VB puts it there.- no case sensitivity , no whitespace sensitivity ( like that other disaster of a language : piss-ton )

author: Stupid Beard
author_rank: Regular Contributor
timestamp: March 12, 2015, 05:30:34 pm
content: I know this was mostly rhetorical, but ...Quote from: free_electron on March 12, 2015, 05:07:55 pmBecause it doesn't know for sure what you MEANT so if it did automatically add things it could generate extremely incorrect code that you assume is valid. Finding bugs in your own code is bad enough, finding bugs that are due to the compiler generating incorrect code is a really pretty shitty experience.Quote from: free_electron on March 12, 2015, 05:07:55 pmA decent C/C++ IDE will do that for you as well, and many other useful language specific things that aren't worth listing.

author: Mechanical Menace
author_rank: Super Contributor
timestamp: March 12, 2015, 06:05:23 pm
content: Quote from: Kjelt on March 12, 2015, 03:11:40 pmgrep is your friend.Quote from: free_electron on March 12, 2015, 05:07:55 pmBecause it's a single use tool, not an entire IDE. You complaining that C compilers aren't also fully fledged IDEs with hand holding features (that I'll admit most of us love) is like arguing that an analogue voltmeter isn't a fully fledged DAQ.It's also not like MSs compilers don't do things the same way.

author: Lesterwyatt
author_rank: Regular Contributor
timestamp: March 12, 2015, 06:47:29 pm
content: Quote from: Mechanical Menace on March 12, 2015, 03:25:32 pmi hope you are correct; where would i find this file then?

author: Mechanical Menace
author_rank: Super Contributor
timestamp: March 12, 2015, 06:57:32 pm
content: Quote from: Lesterwyatt on March 12, 2015, 06:47:29 pmI'm not sure, sorry. I've never used the Arduino IDE. If it's not in your project's folder probably in whichever hidden folder of your home directory it uses.

author: photon
author_rank: Frequent Contributor
timestamp: March 12, 2015, 07:01:20 pm
content: It is very annoying to hear hardware engineers complain about C. It's like writing a review of a Shakespeare play and complaining about Will's writing. If you do not understand it, don't complain about it.

author: Kjelt
author_rank: Super Contributor
timestamp: March 12, 2015, 07:04:01 pm
content: Quote from: photon on March 12, 2015, 07:01:20 pmBoohoo i am a sw eng for 18 yrs, and the quality of error reporting is the same as 30 yrs ago.

author: f1rmb
author_rank: Regular Contributor
timestamp: March 12, 2015, 07:31:18 pm
content: Quote from: Kjelt on March 12, 2015, 07:04:01 pm18 years with same errors?! ;-)

author: rollatorwieltje
author_rank: Unknown
timestamp: March 12, 2015, 07:43:05 pm
content: Quote from: kolonelkadat on March 12, 2015, 02:31:40 pmThe Arduino IDE for some reason can compile your code without actually saving your project file. When you press compile or check it dumps everything to a folder in temp and compiles from there.

author: ion
author_rank: Regular Contributor
timestamp: March 12, 2015, 07:43:37 pm
content: Quote from: Lesterwyatt on March 12, 2015, 06:47:29 pmIn the past I've noticed the Arduino IDE putting the compiled files in the system's default temporary folder. Perhaps there's a copy of the source code there as well?Edit:Just did a quick test and it doesn't look good - there was a text file containing the source code but it disappeared when I closed the IDE.Still, your Temp folder should have a bunch of subfolders named "build(random number string).tmp", one for each time you hit compile. Maybe the contents may be of some use to you.

author: zapta
author_rank: Super Contributor
timestamp: March 12, 2015, 08:00:16 pm
content: You can also extract source code from the elf filehttp://stackoverflow.com/questions/919781/how-can-i-get-an-assembly-language-listing-of-my-arduino-sketches-on-windows

author: zapta
author_rank: Super Contributor
timestamp: March 12, 2015, 08:04:05 pm
content: Quote from: Kjelt on March 12, 2015, 07:04:01 pmI noticed significant improvementshttps://gcc.gnu.org/wiki/ClangDiagnosticsComparison

author: magetoo
author_rank: Frequent Contributor
timestamp: March 12, 2015, 08:06:59 pm
content: Quote from: free_electron on March 12, 2015, 02:27:56 pmHave to join in and agree with this as well. The worst part is that we've had these sort of things since the 1980s, it just never fit in with the file abstraction that everyone assumes.Every so often something "new" (new filesystem, programming metaphor, security tech) comes around and inevitably someone says "That's cool, we did that in 1985 in [Smalltalk/LISP/whatever]". But it never takes off unless you can figure out a way to bolt in onto C, or the file metaphor.

author: Someone
author_rank: Super Contributor
timestamp: March 12, 2015, 09:41:04 pm
content: Quote from: Fsck on March 12, 2015, 03:32:14 pmOS level versioning and autosave, built into all the native applications and trivial to include on 3rd party applications:https://support.apple.com/en-is/HT202255In shipping product since 2011.Hur hur all you like about the Apple ecosystem but they just keep putting in the obvious things that people want (whether the user knew about it before or not), in a way thats easy to use.

author: AdShea
author_rank: Contributor
timestamp: March 12, 2015, 10:08:06 pm
content: IIRC, Clang has a "you're missing the ;" error. It's a heuristic though based on what errors the compiler actually throws.

author: lapm
author_rank: Frequent Contributor
timestamp: March 12, 2015, 11:04:26 pm
content: How did you brake your ubuntu install so it docent warn you about low battery?All my laptops work just fine and warns me well before it runs out... On other hand i always have them on charger to save battery. They are damn expencive on my country...On other hand this highlights need of regular saves and backups..

author: free_electron
author_rank: Super Contributor
timestamp: March 12, 2015, 11:30:39 pm
content: another of these reporting stupidities is compilers vomiting a list of 5000 errors because there is a semicolon missing on line 1 . That doesn't happen in Basic.The C IDE's could do with a bit better intellisense and autocompletion.All languages evolve over time. C is till stuck in the stone ages.Like ,- why does a line of code need to terminate in a semicolon ? there's an effing CR LF pair (or NL if u're on loonix) in the source file already !- why can't the stupid thing differentiate between a = 5 and 'if a = 5'. All it has to do in the parser is remember that it is entering an 'if' clause so the = is not an assignment but a compare. Other languages , much older than c , have done this for decades.A decent parser should be able to parse the followingif if = then then then = else else else = if(if a=b then b=c else c=a)from the syntax it should figure out there are three variables called if then and else and generate correct code. I agree the line of code is not very readable but a decent parser should be able to figure out what is a variable and what is a command.the same goes with that stupid crap of having to define subroutines before you can call them ( in header files ... ) why do i need to type everything twice ? ( once in the header , once in the c file , and then make sure they stay in sync if i alter a function) . All the compiler has to do is run over the source twice. once to collect all functions , once to link. how hard is it to do that ? open source file , run it through the collector to collect functions and their arguments , pass two run over the file again. there is actually no need at all to do this multipass. it can be done single pass. just build a lookup table on the fly. if you hit something not defined inject a symbol in the asm file.so : compile step : translate to ASM what you can , what you cannot : replace by a symbol with the arguments needed. and save a map of entry points.link step : take the map with entry points and replace the symbol with the entry points ( late linking)send output of linker through assembler.done.i don't like languages like 'C' and 'Python' ( that stuff doesn't even have constants...). The computer should do the menial repetitive tasks and make MY life easier. Not the other way around.

author: kolonelkadat
author_rank: Regular Contributor
timestamp: March 13, 2015, 12:11:26 am
content: Quote from: free_electron on March 12, 2015, 11:30:39 pmbecause I want to break up long bits onto multiple lines to improve readability.Quote from: free_electron on March 12, 2015, 11:30:39 pmbecause in some cases it is useful to do " if(a=5)" and mean for it to check the assignment not the equality.

author: Stonent
author_rank: Super Contributor
timestamp: March 13, 2015, 12:16:04 am
content: Atmel Studio uses Visual Studio's environment. I think it, like Microsoft Office, will recover unsaved data. Of course it requires windows. Other option, use google docs and paste into arduino later.

author: elgonzo
author_rank: Unknown
timestamp: March 13, 2015, 12:26:55 am
content: Quote from: free_electron on March 12, 2015, 11:30:39 pmSomehow you seem not having made up your mind here. First, you express that having such a feature in a parser is a good thing. But immediately after, you seem to agree that using such a feature is probably a bad idea - or at least practically useless, since its only 'benefit' is in allowing yet another way to write source code that is difficult to read and maintain...

author: free_electron
author_rank: Super Contributor
timestamp: March 13, 2015, 12:31:48 am
content: Yes i co tradict myself. I want clear distinction between keywords and variables. Otherwise source would be soup... The example given is to show that a parser should be context aware. It should understand when = means "assign" and when it means "compare".

author: PeterFW
author_rank: Frequent Contributor
timestamp: March 13, 2015, 01:33:04 am
content: I just tried it, before i can compile the whole thing for the first time i am prompted to save the file.But to be honest, blaming the software for bad habbits is kinda unfair...

author: BillyD
author_rank: Regular Contributor
timestamp: March 13, 2015, 01:41:09 am
content: Writing code for several days without once saving, and then losing it in a reboot, is the software equivalent of a Darwin Award.Well ok, anyone can make that mistake once whereupon they painfully learn the value of backups.Anything more than that is best removed from the programming gene pool.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: March 13, 2015, 03:20:15 am
content: Quote from: free_electron on March 12, 2015, 11:30:39 pmYou share a complaint with me. I once thought I would be bit wrangler for a career and was taking compiler courses and so on. This was about the time that Algol and C were getting started, and all propounded declarations, special symbols differentiating assignment and equality and the like. The academic literature of the time expounded on how wonderful this was. But when you looked into it, most of the benefits were making the compiler writers job easier. Kind of like saying it would be easier to design oscilloscopes if they didn't have all those knobs and things on the front. (Oh no, we went there too.) The other major benefit I saw was data localization, which is a real benefit on very large software projects. Some languages allow data declarations as an option, so that large projects can benefit, without cluttering the code for smaller projects, but others force large project requirements on the smallest bit of throwaway code.

author: amyk
author_rank: Super Contributor
timestamp: March 13, 2015, 03:33:54 am
content: "Data that is not backed up is data that is worth nothing to you."

author: Stupid Beard
author_rank: Regular Contributor
timestamp: March 13, 2015, 03:41:24 am
content: A quick drive by note about semicolons;It is partly true that their existence makes implementing the compiler easier, but there's more to it than that. If you took away the semicolons but left everything else about the language the same then there would be certain sequences of tokens that could be interpreted in more than one way, and the compiler can't know which one you mean.I don't recall exactly what those situations are for C, and I can't be arsed to look it up.Anyway, it is easy to sit there and criticize why languages do one thing or another. Sometimes things have a trivial bullshit reason (e.g. Python's shitty whitespace syntax crap is solely to force you to write code in the language designer's preferred coding style) and sometimes things are there for a very good but possibly obscure reason that it takes some thought to understand.At the end of the day, though, all this criticism is just mental wankery. None of it prevents you from getting things done or getting things done quickly. The language is what it is and you work with it or you use something else. Or you join the appropriate standards committee and try and change it.Or you can complain on random forums on the internet, possibly derailing other threads in the process. This is, of course, always more fun than getting actual work done.

author: JoeN
author_rank: Frequent Contributor
timestamp: March 13, 2015, 07:22:51 am
content: Quote from: Kjelt on March 12, 2015, 11:05:30 amThat has happened to me on so many boards so many times I now always do ctrl-a, ctrl-c before hitting Post. Just did it...

author: Mechanical Menace
author_rank: Super Contributor
timestamp: March 13, 2015, 07:43:24 am
content: Quote from: free_electron on March 12, 2015, 11:30:39 pmDifferent languages for different users solving different problems and/or using different methodology. I personally want as verbose an output as I can get at times so I can pipe it into a script to filter things to my liking.QuoteSome of them do autocompletion quite well, but I just turn it off when available anyway, it gets in the way.QuoteClarity.QuoteAgain clarity. It's not so specific for the parsers convenience, it's for the coders. Languages newer than C do the same or the same reason.QuoteYou don't, you just need it in the source before you call it. It also allows a couple of things like being able to use a library you have access to headers and not source of, allows you to keep implementations separate from definitions, transparently replace implementations, etc, etc...QuoteYou may not like it but that annoying way of doing things is one of C's greatest strengths. If I'm working on a library for instance I may want to alter a function but not it's definition. Say it's not a major release and we can't deprecate old functions and only conservatively add new ones. The separate definitions help me keep the new implementation compatible with the old, it allows the user to use my new implementation without even recompiling their code...Every language that allows dynamic linking does it the "C" way, even people using ASM generally implement it the C way...QuoteAnd it sounds like you have tools that do that for you. But to get those tools you need tools available to those who are happy to do the "menial repetitive tasks" themselves, or prefer to make their own tools to deal with them anyway

author: deephaven
author_rank: Frequent Contributor
timestamp: March 13, 2015, 08:34:44 am
content: What gets me about C is all those VOIDs everywhere. I would have though a couple of brackets with nothing in them would be a good hint that they're empty rather than having to spell it out each time.

author: Mechanical Menace
author_rank: Super Contributor
timestamp: March 13, 2015, 08:57:52 am
content: Quote from: deephaven on March 13, 2015, 08:34:44 amYou only NEED to do that for the return type if your function doesn't return anything, that's actually quite a recent addition too and for readability reasons.

author: Stupid Beard
author_rank: Regular Contributor
timestamp: March 13, 2015, 09:21:06 am
content: Quote from: Mechanical Menace on March 13, 2015, 07:43:24 amIt's nothing to do with clarity. See my earlier post on semicolons.Quote from: Mechanical Menace on March 13, 2015, 07:43:24 amAgain, nothing to do with clarity. It's because assignments are valid to use in conditionals. So, for example:Code:int foo = 0;if ((foo = something()) == 1){// ... do something ...}is a valid and very common pattern that would not be possible without separate assignment and comparison operators.

author: Kjelt
author_rank: Super Contributor
timestamp: March 13, 2015, 09:26:00 am
content: Quote from: Stupid Beard on March 13, 2015, 09:21:06 amIMO bad example or bad codingif you need foo later on you better use for readability:Code:int foo = 0;foo = something();if (foo == 1){// ... do something ...}if you don't need foo laterCode:if ( something() == 1){// ... do something ...}

author: Stupid Beard
author_rank: Regular Contributor
timestamp: March 13, 2015, 09:41:00 am
content: Quote from: Kjelt on March 13, 2015, 09:26:00 amI used a contrived example to quickly illustrate the syntax I was getting at.Everyone writes code differently and has different opinions about what is clear and how best to do it. However, to an experienced programmer neither is any more or less readable than the other. To argue differently is just to argue that one opinion is more valid than another, which is a pretty silly thing to argue about since there is no right answer.

author: Mechanical Menace
author_rank: Super Contributor
timestamp: March 13, 2015, 09:50:08 am
content: Quote from: Stupid Beard on March 13, 2015, 09:21:06 amAnd a clever parser could still tell the difference, and your example shows how a clever parser that makes the needed assumptions could make things harder for a person to read and debug problems, make it more ambiguous what you're trying to achieve at any given time.

author: Kjelt
author_rank: Super Contributor
timestamp: March 13, 2015, 09:52:29 am
content: Quote from: Stupid Beard on March 13, 2015, 09:41:00 amI agree that style is subjective and is not what I meant to argue.What I meant to argue is that what the original poster you reacted on suggested that in a logical decision the result should always be boolean hence there would not have to be a differentation between = or ==.You argue that it is allowed in C to allocate assignments within that logical decision. There we can argue if that is besides the point.Furthermore you addQuotewhich is absolutely not true since I proved it with my code that it is absolutely possible with separate assignments and comparisons

author: kolonelkadat
author_rank: Regular Contributor
timestamp: March 13, 2015, 10:10:14 am
content: Quote from: Kjelt on March 13, 2015, 09:52:29 amuntil its a conditional loop.Code:while(iterator=moveNext()){...}what are you gonna do, have a different syntax for different conditionals?

author: Stupid Beard
author_rank: Regular Contributor
timestamp: March 13, 2015, 10:12:17 am
content: Quote from: Kjelt on March 13, 2015, 09:52:29 amOh, fair enough. I misunderstood you.Quote from: Kjelt on March 13, 2015, 09:52:29 amI meant that it would not be possible to do in a single statement.Quote from: Mechanical Menace on March 13, 2015, 09:50:08 amYep. Good point. Although, consider:Code:int foo, bar = 1;foo = bar = 0; // initialise both foo and bar to 0foo = bar == 2; // initialise foo to the boolean result of comparing bar to 2; in this case foo will == 0 and bar will == 1That is also valid, common (and possibly even more contrived than the last example) and no amount of cleverness in the compiler can differentiate the two without separate operators.If I hadn't been up for nearly 24 hours I'd have used a real example of when the above is actually useful with many anti-pedantry qualifications, but I can't be arsed so have at it

author: Kjelt
author_rank: Super Contributor
timestamp: March 13, 2015, 10:17:36 am
content: Quoteok agree.

author: Mechanical Menace
author_rank: Super Contributor
timestamp: March 13, 2015, 10:27:58 am
content: Quote from: Stupid Beard on March 13, 2015, 10:12:17 amQuoteBoth of which are things I'd argue the extra clarity having separate symbols for assignment and comparisons makes possible.The semicolon thing is sort of the opposite. It does allow you to spread a bit of code across many more lines than is comfortable to read, or make a nasty single line of convoluted code that does too much in one line to be easy to read even if it's all simple stuff, but it also gives you the power to make things easier to read while accommodating different coding styles as well as allowing those wonderful examples of obfuscated C...