Comments (5)
Hi, thanks for the feedback.
Since this has come up a few times, I'll give a somewhat longer answer, that I can refer to in the future.
There've been some constructive and well meant remarks about the code formatting style used in the Transcrypt core and I owe it to you all to elaborate a bit on that. I value the style suggestions made, since the intention clearly is to make Transcrypt better, but I won't follow them unless they're a clear improvement to what I've learned during my life as a programmer. Here's why.
My first language was Algol 60, followed by Fortran 77, Fortran 90, Cobol, Basic, Turbo Pascal, Ada, Modula II, C, C++, div. macro assemblers, each with their own habits, PLC languages, Java, JavaScript, F# and Python. I've been programming ever since I was fifteen years old, but since I use Python a lot in the last twelve years or so, about five years ago I decided to seriously attempt to follow the habits of its community. It didn't work out for me.
For the projects I earn a living with, like the ones described in the articles on http://www.geatec.com/publications, I have to use a combination of C++ and Python. Since Python classes and C++ classes are used in the same piece of Python or C++ code, consequently sticking to Python style proved a problem. I therefore gathered all I'd learned from the above languages and decided on one eclectic style that I use over all my projects, so that they're internally consistent. Transcrypt also, for me, is part of such a multi-language project, that has been running over multiple years, with contributions of many people. Since, however, I thought it would be worthwhile for the programmer community as a whole, I decided to to split it off and offer it as open source.
But I will not force this indeed somewhat unique style upon developers that use Transcrypt! Instead I will do the following. Since the core is what I'll be working on most for the coming years, I will maintain my 'grown over the years' style there, since changing it would seriously impair my productivity. I also will only very rarely merge any commits in this part of the code, since I have a well defined growth path in mind for it. But I will at all times remain open to good ideas. Don't be offended, however, if I don't follow them (although I might).
HOWEVER: For any libraries it's a completely different story. Some will have Python formatting style, others will have JavaScript style, since that's the ecosystem Transcrypt will have to live in. If anyone should contribute libraries, I will conform to the style utilized there and let go of my own style without hesitation if I would make any contributions to such a library. This is what I've allways done for customers in the past thirty years. If it's well designed, but different from what I would have done, I respect the code that's there and follow its line of thought.
Kind regards
Jacques de Hooge
from transcrypt.
That is crazy.
Here is what I get on my editor:
After replacing tabs to spaces:
After applying autopep8:
from transcrypt.
Yes, ignoring the de-facto standard for Python, PEP8/flake8
, won't do the project a favor. (But every man is the architect of his own fortune, and the majority could be wrong. Who knows.)
from transcrypt.
It sounds like your plan is to work on this intensely until you consider "core" to be feature complete and stable. I wonder if you would consider continuing to use your preferred style during this period and then running something like yapf over it when you decide that it's out of beta. At that point you "will only very rarely merge any commits in this part of the code" so it shouldn't inhibit your productivity.
from transcrypt.
Transcrypt is open sourced, but it's also part of a multi-person, multi-year research project with its own coding standards, that are consistent over Python, C++ and JavaScript. This 'esparanto' coding style is for the core only. Also Transcrypt programs will use many JavaScript libraries, that habitually use camel case instead of pothole case for function- and varnames. But pure Python libraries and applications can completely follow PEP-8 if so desired, so application programmers needn't be bothered.
from transcrypt.
Related Issues (20)
- Adding two lists converts to a string HOT 2
- Is Transcrypt Dead? HOT 5
- nodejs_demo doesn't work as described on web site; does via readme HOT 2
- Compile error when importing a long (path and class) name HOT 2
- Feature: `__` private members/name mangling in classes HOT 1
- No error is thrown in list.pop(idx) when the index is out of range
- Can you please maintain directory structure in __target__/ ? HOT 1
- A boolean operator is translated to a bitwise operator, not a boolean operator HOT 1
- A method in the second base class is not called even when the first base class is empty.
- Minification error on del[] HOT 1
- Python built-in map() to support more than one iterable HOT 3
- How to compare two methods?
- ... in python code aborts compilation HOT 1
- Add python 3.12 syntax support HOT 1
- sorted(x) modifies the argument x (bug?) HOT 3
- math.copysign() is not a function (missing?) HOT 2
- Handling JSON Module Compatibility in Transcrypt HOT 2
- How to write a module and test it HOT 1
- problems when running the autotests HOT 1
- Multiline literal JS that is ignored by CPython HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transcrypt.