Artwork

Nội dung được cung cấp bởi HackerNoon. Tất cả nội dung podcast bao gồm các tập, đồ họa và mô tả podcast đều được HackerNoon hoặc đối tác nền tảng podcast của họ tải lên và cung cấp trực tiếp. Nếu bạn cho rằng ai đó đang sử dụng tác phẩm có bản quyền của bạn mà không có sự cho phép của bạn, bạn có thể làm theo quy trình được nêu ở đây https://vi.player.fm/legal.
Player FM - Ứng dụng Podcast
Chuyển sang chế độ ngoại tuyến với ứng dụng Player FM !

Temporary Lifetime Extension: Complicated Cases

8:41
 
Chia sẻ
 

Manage episode 423761675 series 3474159
Nội dung được cung cấp bởi HackerNoon. Tất cả nội dung podcast bao gồm các tập, đồ họa và mô tả podcast đều được HackerNoon hoặc đối tác nền tảng podcast của họ tải lên và cung cấp trực tiếp. Nếu bạn cho rằng ai đó đang sử dụng tác phẩm có bản quyền của bạn mà không có sự cho phép của bạn, bạn có thể làm theo quy trình được nêu ở đây https://vi.player.fm/legal.

This story was originally published on HackerNoon at: https://hackernoon.com/temporary-lifetime-extension-complicated-cases.
Software design is difficult. One has to design features to fit past and future code. C++ Temporary lifetime extension can teach us a lesson about such design.
Check more stories related to programming at: https://hackernoon.com/c/programming. You can also check exclusive content about #c++, #software-design, #learning-c++, #software-engineering, #polymorphism, #legacy, #performance-optimization, #temporary-lifetime-extension, and more.
This story was written by: @bohdanlab. Learn more about this writer by checking @bohdanlab's about page, and for more stories, please visit hackernoon.com.
This article shows us two, at the first glance, distinct examples of c++ temporary lifetime extension (TLE) feature behavior. The one where we extend temporary lifetime through polymorphic reference conversion and the one where we do it through bounding a field of a temporary directly to a reference. However, if you look deeper you will see that in some context these two examples are similar. And therefore the feature behavior in both cases should be the same. The consistency is an important aspect of any design which helps users use the feature and temporary lifetime extension can show it on its own example.

  continue reading

270 tập

Artwork
iconChia sẻ
 
Manage episode 423761675 series 3474159
Nội dung được cung cấp bởi HackerNoon. Tất cả nội dung podcast bao gồm các tập, đồ họa và mô tả podcast đều được HackerNoon hoặc đối tác nền tảng podcast của họ tải lên và cung cấp trực tiếp. Nếu bạn cho rằng ai đó đang sử dụng tác phẩm có bản quyền của bạn mà không có sự cho phép của bạn, bạn có thể làm theo quy trình được nêu ở đây https://vi.player.fm/legal.

This story was originally published on HackerNoon at: https://hackernoon.com/temporary-lifetime-extension-complicated-cases.
Software design is difficult. One has to design features to fit past and future code. C++ Temporary lifetime extension can teach us a lesson about such design.
Check more stories related to programming at: https://hackernoon.com/c/programming. You can also check exclusive content about #c++, #software-design, #learning-c++, #software-engineering, #polymorphism, #legacy, #performance-optimization, #temporary-lifetime-extension, and more.
This story was written by: @bohdanlab. Learn more about this writer by checking @bohdanlab's about page, and for more stories, please visit hackernoon.com.
This article shows us two, at the first glance, distinct examples of c++ temporary lifetime extension (TLE) feature behavior. The one where we extend temporary lifetime through polymorphic reference conversion and the one where we do it through bounding a field of a temporary directly to a reference. However, if you look deeper you will see that in some context these two examples are similar. And therefore the feature behavior in both cases should be the same. The consistency is an important aspect of any design which helps users use the feature and temporary lifetime extension can show it on its own example.

  continue reading

270 tập

Tất cả các tập

×
 
Loading …

Chào mừng bạn đến với Player FM!

Player FM đang quét trang web để tìm các podcast chất lượng cao cho bạn thưởng thức ngay bây giờ. Đây là ứng dụng podcast tốt nhất và hoạt động trên Android, iPhone và web. Đăng ký để đồng bộ các theo dõi trên tất cả thiết bị.

 

Hướng dẫn sử dụng nhanh