Table and Query Classes good or unnecessary?
On Sun, Mar 18, 2018 at 7:27 PM, Bastiaan Olij <bastiaan@basenlily.me>
wrote:
> Hey Clifford,
>
> On 17/3/18 10:23 am, Clifford Ilkay wrote:
> > “The right tools”… like any text editor or virtually any IDE. The
> amateur
> > mistake of mixing tabs and spaces for indentation, you’ll only make once.
> > Once you’ve gotten over it, it’s really a no-brainer. If you were on my
> > team, I’d even create a git hook, say “martenProofTheIndentation”, and
> let
> > git handle any potential errors. 🙂
>
> I respectfully disagree.
>
> While I have gotten used to these crazy indentation rules and can attest
> that the right IDE has made life a lot easier, I still hate this part
> with a vengeance. In no way do I find it makes my code more readable and
> especially with larger decision trees it is so friggen hard to figure
> out the flow of your application. Give me curly brackets any day over this.
>
I prefer significant whitespace to curly braces any day but I’m certainly
not going to stop using curly brace languages just because they use curly
braces.
> That said, you do get used to it, and with the right IDE it isn’t any
> huge hurdle, but that it requires a specialized IDE for you to make
> sense of the flow of your own code because hidden characters can easily
> break things speaks volumes to me. I’ve learned to live with it, but I
> will never like it.
It does not require a “specialized IDE”. It just requires you to be
consistent with either tabs or spaces for indentation. You have the same
issue with different line endings on different operating systems. If you
have team members using different operating systems, as I do (Linux for me,
Windows and OS X for others), you learn to use git hooks to normalize line
endings, number of spaces to indent, to replace tabs with spaces, etc.
Linters and editor configuration files also help.
Even if you’re a solo developer and you want to write idiomatic code for
the language or framework in question, you should make an effort to find a
.editorconfig for that community. For example, here is the one for Django: <
github.com/django/django/blob/master/.editorconfig>. Here is the
one for LibreOffice: <
github.com/LibreOffice/core/blob/master/.editorconfig>. You’ll
notice the variety of source code and configuration file formatting both
cover. Whenever I start a new project, I search for a .editorconfig file
for the type of project I’m working on and if one doesn’t exist, I’ll
create one by inheriting from a similar one. I also have a .gitignore and
project templates that I use. That makes indentation or curly braces issue
much ado about nothing.
Some languages, like Dart and Go, which are both from Google, use
formatters as part of the toolchain. They use dartfmt <
www.dartlang.org/guides/language/effective-dart/style#do-format-your-code-using-dartfmt>
and gofmt <blog.golang.org/go-fmt-your-code>, respectively. You
don’t have to deal with this on Omnis because Omnis imposes one way of
doing things on developers by virtue of offering only one way to write
Omnis code, the Omnis IDE. The price you pay for being able to use any text
editor or IDE to develop applications in most other languages is that you
have to deal with the relatively minor issue of code formatting.
Regards,
Clifford Ilkay
+1 647-778-8696 <(647)%20778-8696>
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com