Table and Query Classes good or unnecessary?
On Mon, Mar 19, 2018 at 10:00 PM, Bastiaan Olij <bastiaan@basenlily.me>
wrote:
> Hey Clifford,
>
> On 20/3/18 11:19 am, Clifford Ilkay wrote:
> >
> > Every single language that isn’t Omnis or has an IDE like Omnis requires
> “a
> > whole set of tools and helpers to make your life easier”. If you’re
> writing
> > C, C++, Java, C#, Go, Dart, JavaScript, PHP, Ruby, whatever, without some
> > setup of your environment, and especially if you’re working on a team, a
> > style guide and a linter, you’re going to annoy your teammates.
> True, though just like with Omnis, many development environments come as
> a completely package. XCode or Visual Studio, while both incredibly
> bloated give you the tools you need. Its a flawed argument though and
> you are correct, with Python all you get is the compiler, and you pick
> the toolset you wish to use on top of that. The same applies to me
> writing C/C++ code. I actually avoid XCode and Visual Studio like the
> plague preferring to use tools like Sublime.
> >
> > function mySuperDuperFunction()
> > {
> > // do all the things
> > }
> MY EYES, MY EYES! Yes, this is just one of the indentation horrors
> Microsoft has unleached on us and they apply it across the board, C,
> C++, C#, VB,….
But at least they offer it as the default option, they do not enforce
> it. If you don’t like it, layout your code the way that works for you
> and your team and C/C++ gives you immense freedom here.
> Unlike python where changing the layout of your code to something that
> looks readable to you and your team BREAKS YOUR CODE!
>
You know the last time that happened on any team I’ve been on? NEVER. This
is much ado about nothing. In fact, in Python 2x, you can freely mix tabs
and spaces in your space with no impact on how it works but it’s
recommended, not mandatory, to convert everything to spaces. Python 3 does
not allow mixing spaces and tabs.
Perhaps Python With Braces is more to your liking. 🙂 < python-with-braces.appspot.com/>
> Seriously, how can you judge Microsoft for changing a code style but
> defend Python for forcing one on you?
It’s precisely due to the lack of anything like PEP8 <
www.python.org/dev/peps/pep-0008/> in C, C++ that Microsoft chose
that approach with C#. There was a void (pun intended) and Microsoft filled
it. By the way, I recall seeing that in non-Microsoft code, too, like in
the Borland C++ examples.
This reminds me, do you know why the path separator on DOS is a backslash?
Microsoft wanted to distinguish DOS from Unix. It used to annoy me every
time I would forget and type forward slash in a command prompt in Windows
back in the days when Windows didn’t support forward slashes for path
separators as modern Windows does.
Guido van Rossum is known as the BFDL (Benevolent Dictator for Life) of
Python and in general, I think he has done a great job of not only
designing a language that is used in virtually every aspect of computing
except for stuff close to the machine but by making pragmatic choices, like
enforcing indentation. I loved the indentation from the first time I saw it
and consider it a feature, not a bug. That wasn’t really what attracted me
to Python though. What attracted me was easy it was to learn, how sparse
the language was, and how it had a well-reasoned standard library. The
Python shell was the clincher. I learned more about Python by fooling
around in ipython than I did by reading. Type the name of a module,
function, or object and put a question mark after it to get its docstring.
Everything between the hash marks is copied from an ipython shell.
##############################
In [7]: import os
In [8]: os?
Type: module
String form:
File: /usr/lib/python2.7/os.py
Docstring:
OS routines for NT or Posix depending on what system we’re on.
This exports:
– all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.
– os.path is one of the modules posixpath, or ntpath
– os.name is ‘posix’, ‘nt’, ‘os2’, ‘ce’ or ‘riscos’
– os.curdir is a string representing the current directory (‘.’ or ‘:’)
– os.pardir is a string representing the parent directory (‘..’ or ‘::’)
– os.sep is the (or a most common) pathname separator (‘/’ or ‘:’ or ‘\’)
– os.extsep is the extension separator (‘.’ or ‘/’)
– os.altsep is the alternate pathname separator (None or ‘/’)
– os.pathsep is the component separator used in $PATH etc
– os.linesep is the line separator in text files (‘r’ or ‘n’ or ‘rn’)
– os.defpath is the default search path for executables
– os.devnull is the file path of the null device (‘/dev/null’, etc.)
Programs that import and use ‘os’ stand a better chance of being
portable between different platforms. Of course, they must then
only use functions that are defined by all platforms (e.g., unlink
and opendir), and leave all pathname manipulation to os.path
(e.g., split and join).
##############################
Put a dot after the name of a module, function, or object and get its
methods and attributes.
Regards,
Clifford Ilkay
+1 647-778-8696
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com