Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sklogic
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
241.
▲
by
sklogic
10y ago
The point is that this is not a type inference, it is a restricted form of a type propagation (i.e., a subset of the pre-auto C++ type propagation, not an extension of it).
242.
▲
by
sklogic
10y ago
The type 'return type of f()' is still a type . It does not matter that it is not normalised, most of the C++ types are used in a non normal form. Type 'struct MyKewlMegaStructure' is not any different and not any more
243.
▲
by
sklogic
10y ago
Type of x is a very explicit literal type. Type of y is also fully explitit, it is a 'return type of f()'. Not any different from a type of a sub -expression.
244.
▲
by
sklogic
10y ago
C++ got a much stricter guiding philosophy than the Python zen. This is it: "you should never pay for the features you do not use". The entire language is built with this guiding principle in mind.
245.
▲
by
sklogic
10y ago
I do not think there was a single bit of a Python influence in C++ design. People behind these changes are all seasoned PL researchers and they have far better sources of inspiration than just a poor little Python.
246.
▲
by
sklogic
10y ago
In case of a C++ auto, type is specified explicitly - it is an RHS type of an assignment. Type is not deduced here, it is symply propagated. Auto does not add anything new at all on top of the existing type checking: if for a specific LHS t
247.
▲
by
sklogic
10y ago
Not in "some cases" but in "all cases". Python did not introduce anything new in this list.
248.
▲
by
sklogic
10y ago
Funny how Python narrows the perspective of its practitioners. To brand as "pythonic" all those decades old concepts that had been well known and widespread long before Python is, well, among the most amusing symptoms of a fanboy
249.
▲
by
sklogic
10y ago
It is not nearly enough for a code to just work and be useful. Code quality is what determines how maintainable it is, how long will it stay relevant, how long will it survive the changing requirements and environment. And it is much harder
250.
▲
by
sklogic
10y ago
What's wrong with the short variable names? Did you ever encounter long variable names in any decent, readable mathematical paper or even a textbook?
251.
▲
by
sklogic
10y ago
The threshold of what the high code quality is was set long ago and remains far beyond the reach of the mere mortals. You will hardly find anything even distantly approaching the quality of TeX and Metafont. Not sure if there are mirrors on
252.
▲
by
sklogic
10y ago
Actually, quite a few of them do publish at least preprints outside of the peer review journals. For about 80% of the papers I needed recently that were behind a paywall, I managed to find PDFs published by the authors somewhere else.
253.
▲
by
sklogic
10y ago
It is very hard to reason about the laziness, unfortunately, so it is more of a beautiful hack most often rather than a sustainable design methodology. While with macros you've got a very simple, reproducible, verifiable design methodo
254.
▲
by
sklogic
10y ago
All the arguments against the CL-style macros are stemming from the fact that it's far too easy to get into a total mess with them, simply because of their infinite flexibility. Yet, if you follow some very simple rules, you'll ge
255.
▲
by
sklogic
10y ago
It can be done without macros, but any such solution (fexprs included) would be much worse than a macro-based one. Much more complicated, much less efficient, etc.
256.
▲
by
sklogic
10y ago
No. If possible, do things with macros. And it is always possible to do things with macros. Why? Because macros are the best way to implement simple, nice, clean, maintainable eDSLs. And any problem is best solved with its most natural la
257.
▲
by
sklogic
10y ago
Nemerle had quite an interesting solution to this problem back then. http://research.microsoft.com/en-us/um/people/moskal/pdf/msc...
258.
▲
by
sklogic
10y ago
It is a practical and fast compiler implemented on top of Nanopass. A very good example of why the more IRs - the better.
259.
▲
by
sklogic
10y ago
There is nothing surprising in this fact. I always argued that even a very simple language needs not one, not two, but dozens of consequent IRs. Why? See the recently opensourced ChezScheme.
260.
▲
by
sklogic
10y ago
Unlike the C API it got a lot of sane defaults.
261.
▲
by
sklogic
10y ago
And compiling in a debug mode also results in huge recompile times. Is it such a problem? There is no big difference between building with contracts and logs on (log level is selected dynamically, no need to recompile) and building with deb
262.
▲
by
sklogic
10y ago
I'm 100% serious. Interactive debugging is hugely overrated. I am not aware of a debugging technique better than logging + contracts + asserts.
263.
▲
by
sklogic
10y ago
> an implementation in either a dynamically typed language ML in Lisp and Prolog: https://github.com/combinatorylogic/mbase/tree/master/src/l/...
264.
▲
by
sklogic
10y ago
> The only way they debug the massive Scheme part is using print statements. Why would you need anything else for debugging?!?
265.
▲
by
sklogic
10y ago
> in fact that's how hash tables in essentially ALL languages ARE implemented Obviously a false statement.
266.
▲
by
sklogic
10y ago
C is far too high level to be a "foundation". NAND gate is a foundation.
267.
▲
by
sklogic
10y ago
Everything I witnessed was not just a bunch of boolean conditions, but a mess of boolean conditions. This is where complexity comes from. And, think about the awful stuff like derivatives, taxes, etc.
268.
▲
by
sklogic
10y ago
There is an official Khronos C++ wrapper API that is significantly more dense than the underlying C API.
269.
▲
by
sklogic
10y ago
You're designing algorithms even when you're coding a FizzBuzz or a "Hello, world". And most of the business logic is by far more complex than FizzBuzz.
270.
▲
by
sklogic
10y ago
OpenCL is very low level (sort of like Vulkan, which was actually inspired by it). Start with some easy wrappers, like PyOpenCL.
More ›