|
|
Subscribe / Log in / New account

Knoll: Technical vision for Qt 6

Lars Knoll describes the goals for the next major version of the Qt graphics toolkit. "Qt has been growing a lot over the last years, to the point where delivering a new version of it is a major undertaking. With Qt 6 there is an opportunity to restructure our product offering and have a smaller core product that contains the essential frameworks and tooling. We will use the market place to deliver our add-on frameworks and tools, not as a tightly coupled bundle with the core Qt product."

to post comments

Knoll: Technical vision for Qt 6

Posted Aug 8, 2019 5:12 UTC (Thu) by kragil (guest, #34373) [Link]

Looks really promising. I really hope developing fast apps in QML will be much nicer with Qt6.

Knoll: Technical vision for Qt 6

Posted Aug 8, 2019 9:01 UTC (Thu) by sur5r (subscriber, #61490) [Link] (2 responses)

I remember reading a blog post several years ago saying moc could finally go away with C++14/17 and Qt6. I hope they are still planning to do so.

Knoll: Technical vision for Qt 6

Posted Aug 8, 2019 15:25 UTC (Thu) by mathstuf (subscriber, #69389) [Link] (1 responses)

It is unlikely. While it is *possible* to implement `moc` using C++11/14 features, I believe the hit to compile time was significant. There's still the `uic` and `rcc` stuff, so even getting rid of `moc` wouldn't completely fix the build complications involved with Qt.

Knoll: Technical vision for Qt 6

Posted Aug 10, 2019 0:36 UTC (Sat) by bartoc (guest, #124262) [Link]

afaik you can't really do it without a bunch of macros. I believe the qt people are thinking of replacing moc with reflection once that feature is available (probably 2023)

Dynamic typing

Posted Aug 8, 2019 9:58 UTC (Thu) by HelloWorld (guest, #56129) [Link] (11 responses)

“Weak typing makes it hard for our users to apply large changes to their codebases.”
“Having a full JavaScript engine when using QML can complicate things and is an overhead”
“With strong typing and simpler lookup rules we can convert QML to efficient C++ and native code, significantly increasing runtime performance”

IOW dynamic typing is slow, bloated and unmaintainable. Well who would have thought?

Dynamic typing

Posted Aug 9, 2019 4:55 UTC (Fri) by kragil (guest, #34373) [Link]

Yeah, but it was the fad of day back then.

Dynamic typing

Posted Aug 9, 2019 7:47 UTC (Fri) by gedeon (subscriber, #21965) [Link] (9 responses)

You are making a point the author did not. He is speaking about weak/strong typing and you speak about dynamic typing, which is not the same thing. You probably know the difference but your demonstration is still wrong. https://stackoverflow.com/questions/2351190/static-dynami...

Dynamic typing

Posted Aug 9, 2019 9:51 UTC (Fri) by HelloWorld (guest, #56129) [Link] (1 responses)

> He is speaking about weak/strong typing and you speak about dynamic typing, which is not the same thing.
The term strong/weak typing has been used inconsistently by different people, so it' not obvious at first what exactly Lars means when he writes about “strong typing”. But he does write this:

> A strong type system allows for IDEs and other tools to support our users in this task and dramatically ease the maintenance. Also, we will be able to generate much better-performing code and reduce overhead. […] With strong typing and simpler lookup rules we can convert QML to efficient C++ and native code

None of these make sense if you assume that by “strong typing” he means “absence of implicit conversions between types”, and they all make sense if you assume that what he really meant was static typing.

Dynamic typing

Posted Aug 10, 2019 9:34 UTC (Sat) by swilmet (subscriber, #98424) [Link]

A good paper by Stephen Kell that tries to clarify the notion of types, to better characterize them:
In Search of Types

Dynamic typing

Posted Aug 9, 2019 13:32 UTC (Fri) by jem (subscriber, #24231) [Link] (6 responses)

Dynamic typing in a programming language is just as bad, if not worse. Dynamic typing in (for example) Python, means some rarely called code can blow up at run time years after being put in production because a function is called with an object the function didn't expect. Not even 100% test coverage can help here. Another problem I see with dynamic typing is the lack of type declarations for variables and parameters. This makes it hard to read Python code, because there is no straightforward way to see what a function expects as parameters.

On the topic of weakly typed languages: sometimes I get the feeling C++ is a weakly typed language, not only because of the automatic conversions provided by the language, but also because coders spend way to much time to come up with esoteric explicit conversions and overloaded operators, just for the fun of it.

Dynamic typing

Posted Aug 9, 2019 14:22 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link] (5 responses)

"Dynamic typing in (for example) Python, means some rarely called code can blow up at run time years after being put in production because a function is called with an object the function didn't expect"

Use Type Hints (c.f. https://docs.python.org/3/library/typing.html) and enforce it at commit time.

Dynamic typing

Posted Aug 10, 2019 9:48 UTC (Sat) by swilmet (subscriber, #98424) [Link] (4 responses)

Python type hints is only for function parameters and return values, not for other variables. For other variables, you need to look elsewhere in the code to know the type, by examining the right-hand side of the assignments (if it's a function call, look at that function definition). It's more work for the developer when trying to understand the code.

Also, when there is a typo in a variable or function name, the error can be discovered only at runtime AFAIK. When doing big refactorings in a sizeable codebase, having a good compiler is of great help.

Dynamic typing

Posted Aug 10, 2019 12:11 UTC (Sat) by rahulsundaram (subscriber, #21946) [Link] (3 responses)

$vi quicktest.py

#!/usr/bin/python3

is_this_true: bool = True

is_this_true: bool = 'explain_this'

$mypy quicktest.py
quicktest.py:5: error: Incompatible types in assignment (expression has type "str", variable has type "bool")

Dynamic typing

Posted Aug 10, 2019 12:23 UTC (Sat) by rahulsundaram (subscriber, #21946) [Link]

> Also, when there is a typo in a variable or function name, the error can be discovered only at runtime AFAIK

Use something like https://github.com/nvie/vim-flake8 and have some tests built-in. Not perfect but certainly not too hard to stop the easy mistakes

Dynamic typing

Posted Aug 14, 2019 13:47 UTC (Wed) by swilmet (subscriber, #98424) [Link] (1 responses)

Oh, so type hints can be applied to local variables too, good to know!

Unfortunately there are lots of Python codebases out there without type hints.

Dynamic typing

Posted Aug 14, 2019 14:02 UTC (Wed) by rahulsundaram (subscriber, #21946) [Link]

> Oh, so type hints can be applied to local variables too, good to know!

Indeed, keep in mind this is fairly recent: Python 3.6

> Unfortunately there are lots of Python codebases out there without type hints.

This is slowly changing, if you care about a codebase either submit a PR or have stub files in parallel that adds such support if upstream is not convinced of them yet along the lines of https://github.com/python/typeshed


Copyright © 2019, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds